Entity Framework Provider Type Could Not Be Loaded

Entity Framework Provider type could not be loaded?

Same problem, but i installed EF 6 through Nuget. EntityFramework.SqlServer was missing for another executable. I simply added the nuget package to that project.

The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' could not be loaded

I fixed this by installing entity framework in the WCF host site.

That worked.

How do I solve The Entity Framework provider exception

@FranciscoGoldenstein saying ! You don't need to install Entity Framework in your Console application or whatever, you just need to add a reference to the assembly EntityFramework.SqlServer.dll. You can copy this assembly from the Class Library project that uses Entity Framework to a LIB folder and add a reference to it.

In summary:

  • Class Library application:

    • Install Entity Framework
    • Write your data layer code
    • app.config file has all the configuration related to Entity Framework except for the connection string.
  • Create a Console, web or desktop application:

    • Add a reference to the first project.
    • Add a reference to EntityFramework.SqlServer.dll.
    • app.config/web.config has the connection string (remember that the name of the configuration entry has to be the same as the name of the DbContext class.

it is work for me ! I hope it helps.

also try this link Entity Framework Provider type could not be loaded?

Entity Framework provider error

Have you found a solution for this problem? Otherwise you could take a look here: Entity Framework Provider type could not be loaded?

Most of the time when I see this exception it's because the web application doesn't have Entity Framework installed (and / or missing the EntityFramework.SqlServer.dll).

So to give an example, if you have 2 projects in a solution:

  • WebApp
  • DataAccess

and with Entity Framework installed in the DataAccess project. When wanting to call a method on a class (for example a repository) from the DataAccess project within the WebApp, 2 things are needed:

  • WebApp needs a reference to DataAccess
  • Webapp also needs EF to be installed

When DataAccess has EF installed and then added as a reference to WebApp, the WebApp project will (normally) also install EF. Sometimes in unexpected situations the installation of EF in the WebApp fails. Therefore not adding the needed references and showing the exception message you mentioned. Hopefully this answer will help some others.

Entity Framework Provider type could not be loaded? in QA; works in Test

Make sure that the EntityFramework DLL was added to the ASP.NET MVC Project. All projects that call database methods must have the EntityFramework's DLL.



Related Topics



Leave a reply



Submit