I am busy building my first MVC3 app, with Code first to create my Databse schema.
I have got my DB Context class and all my created models with all the Data Annotation mappings created, but now it does not want to create my Database ..
I get the following messeges in my Web.Config file:
Message 1 Could not find schema information for the element 'entityFramework'.
Message 2 Could not find schema information for the element 'defaultConnectionFactory'.
Message 3 Could not find schema information for the attribute 'type'.
Message 4 Could not find schema information for the element 'parameters'.
Message 5 Could not find schema information for the element 'parameter'.
Message 6 Could not find schema information for the attribute 'value'.
Jacques444
Member
41 Points
54 Posts
Could not find schema information for the element 'entityFramework'.
Aug 16, 2012 06:19 AM|LINK
Hi,
I am busy building my first MVC3 app, with Code first to create my Databse schema.
I have got my DB Context class and all my created models with all the Data Annotation mappings created, but now it does not want to create my Database
..
I get the following messeges in my Web.Config file:
Message 1 Could not find schema information for the element 'entityFramework'.
Message 2 Could not find schema information for the element 'defaultConnectionFactory'.
Message 3 Could not find schema information for the attribute 'type'.
Message 4 Could not find schema information for the element 'parameters'.
Message 5 Could not find schema information for the element 'parameter'.
Message 6 Could not find schema information for the attribute 'value'.
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> <entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"> <parameters> <parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" /> </parameters> </defaultConnectionFactory> </entityFramework> </configuration>Above is my Web.Config that I use. And I am using Entity Framework 4.3.1
Any Advice will be greatly appreciated!
mm10
Contributor
6455 Points
1187 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 16, 2012 12:51 PM|LINK
Did you include the EntityFramework section in configSections (?) :
<configuration> <configSections> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </configSections> .... </configuration>http://go.microsoft.com/fwlink/?LinkID=237468
Jacques444
Member
41 Points
54 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 16, 2012 12:53 PM|LINK
Yup
mm10
Contributor
6455 Points
1187 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 16, 2012 01:10 PM|LINK
Did you add the EntityFramework dll to your application's BIN folder or to the GAC?
Jacques444
Member
41 Points
54 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 17, 2012 04:48 AM|LINK
Added it to the local project, so it's in the bin folder and not the GAC
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 18, 2012 01:20 AM|LINK
Hi,
Is this happening only when publishing your website or happening both local machine?
Jacques444
Member
41 Points
54 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 20, 2012 04:32 AM|LINK
Hi Decker,
This is happening on my local machine. And not on a published version
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 20, 2012 04:39 AM|LINK
Hi again Jacques444,
So how did you do coding?And have u downloaded the latest version of EF Code-first dll and import it into your project using NuGet?
Jacques444
Member
41 Points
54 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 20, 2012 04:42 AM|LINK
Yes i used NuGet to obatain the EF package. I Used this URL as a reference http://nuget.org/packages/EntityFramework/
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: Could not find schema information for the element 'entityFramework'.
Aug 20, 2012 04:50 AM|LINK
How did u code?