After downloading the EF6 by nuget and try to run my project, it returns the following error:
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.
Deleting the BIN-Folder did it for me
You should force a static reference to the EntityFramework.SqlServer.dll assembly, but instead of putting a dummy code, you can do this in a more beautiful way:
If you already have a DbConfiguration class:
If you don't have a DbConfiguration class you must put the following code at app startup (before EF is used):
You can also see this message if you forget to include "EntityFramework.SqlServer.dll".
It appears to be a newly added file in EF6. Initially I hadn't included it in my merge module and ran into the problem listed here.
Instead of adding EntityFramework.SqlServer to host project you can ensure a static reference to it from your Model/entity project like this
This will make the build process include the assembly with the host project.
More info on my blog http://andersmalmgren.com/2014/08/20/implicit-dependencies-and-copy-local-fails-to-copy/
You've added EF to a class library project. You also need to add it to the project that references it (your console app, website or whatever).
I got the same error while using Entity Framework 6 with SQL Server Compact 4.0. The article on MSDN for Entity Framework Providers for EF6 was helpful. Running the respective provider commands as nuget packages at Package Manager Console might solve the problem, as also NuGet packages will automatically add registrations to the config file. I ran
PM> Install-Package EntityFramework.SqlServerCompact
to solve the problem.