My current setup:
I added references to 'EntitiesProjectIO' to my 'MvcProject' and made a call to 'GetData(...)'.
Schema specified is not valid. Errors: \r\nSurgeryManagementEntities.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Make sure the provider is registered in the 'entityFramework' section of the application config file. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
is the message I get and I have now idea what the *** is going on. I already added references to nearly every known assembly, copied files from the DB-only project (EntitiesProject). Also copied EntityFramework.dll, tried NuGet for the prjects referencing the DB-Library... Edited the web.config, App.config, whatever.config. Still the same error
It's a brand new project/solution created within VS2013. Therefore I have no upgrade-issues or something else. Just a clean new solution...
Your frontend config file must have the provider registered like this:
<entityFramework> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <providers> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> </providers> </entityFramework>
The app config should have been modified after you added Entity Framework 6 thru nuget (which should have also added references to assembly EntityFramework.dll and EntityFramework.SqlServer.dll), you do that by issuing an "Install-Package EntityFramework -Version 6.0.0" in the Package Manager Console. (notice there are newer versions, see https://www.nuget.org/packages/EntityFramework).
After that, you just need to rebuild the solution (so the app config gets copied to the output folder of the project, where the EDMX designer will look for it).
Your project also needs to target .NET 4 or .NET 4.5 to use EF6.