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.
I have just re-installed the Entity Framework using Nuget. And follow the instruction written on the link below : http://robsneuron.blogspot.in/2013/11/entity-framework-upgrade-to-6.html
I think the problem will get solved.
I have the same error. It's weird that it only happens whenever I used my dbContext to query to any of my model or get its list like:
We tried to reinstall the Entity Framework, reference it properly but to no avail.
Luckily, we tried to check the Nuget for
ALL
solutions, then update everything or make sureeverything
is the same version because we noticed that the two projects has different EF versions on the Web project. And it works. The error is gone.Here is the screenshot on how to Manage Nuget for all solutions:
it looks like nobody mentioned first checking if System.Data.SqlClient is installed in the system and if a reference is made to it.
i solved my issue by installing System.Data.SqlClient and adding in a new provider in app.Config
None of these worked for me. I did find the solution in another stackoverflow question. I'll add it here for easy reference:
When the error happens in tests projects the prettiest solution is to decorate the test class with:
As message shows that we need to add provider System.Data.SqlClient that's why we need to install nuget package of EntityFramework that has two dll but if we are developing only console application then we just need to add reference of EntityFramework.SqlServer.dll