Skip to content
Pinter Computing

Knowledge Base for IT Professionals, Teachers, and Astronauts

Pinter Computing

Knowledge Base for IT Professionals, Teachers, and Astronauts

  • Home
  • Programming
  • DevOps
  • Project Management
  • Software and Hardware
  • Miscellaneous
  • Egyebek
  • About
  • Experience
  • Education
  • Contact
  • Home
  • Programming
  • DevOps
  • Project Management
  • Software and Hardware
  • Miscellaneous
  • Egyebek
  • About
  • Experience
  • Education
  • Contact
Close

Search

.NET FrameworkMicrosoft SQL ServerMicrosoft Visual Studio

The Entity Framework provider … could not be loaded

By Laszlo Pinter
November 10, 2013 1 Min Read
7

When you create a new Microsoft Visual Studio 2013 project that uses the Entity Framework you may get the following error message:
The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer’ registered in the application config file for the ADO.NET provider with invariant name ‘System.Data.SqlClient’ could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information.

  • Add the EntityFramework NuGet package to the Data Access project that accesses the database and the Web Application or Web Service project that calls the project
    • Right click the project in Solution Explorer
    • Select Manage NuGet Packages…
    • On the left side select Online
    • On the right side enter EntityFramework into the search field
    • Click Install next to the EntityFramework package
  • Make sure your app config file contains the following lines:

 

<entityFramework>
  <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
    <parameters>
      <parameter value="v11.0" />
    </parameters>
  </defaultConnectionFactory>
  <providers>
    <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
  </providers>
</entityFramework>
  • Your project should contain a reference to EntityFramework.SqlServer.dll
  • Add the following line to the constructor of the class that accesses the database
var type = typeof(System.Data.Entity.SqlServer.SqlProviderServices);
  • Add the System.Data.Entity reference to the project accessing the database

Tags:

VisualStudio
Author

Laszlo Pinter

Follow Me
Other Articles
Previous

How to migrate the Visual Studio 2013 user database to SQL Server 2008

Next

The underlying provider failed on Open

7 Comments
  1. dglambert says:
    May 2, 2014 at 3:53 pm

    Hello, so I have a data layer project (class library (no config files)) that uses EF, but what if i don’t want my client project to reference EF at all, I want to abstract that out, is this possible? Based on what I have heard it should be

    Reply
  2. Colin Callahan says:
    September 14, 2014 at 11:19 am

    Thanks for the tip

    Reply
  3. asdasd says:
    June 3, 2015 at 10:43 pm

    genio!!!!!!!!!!!!!!!!!!!

    Reply
  4. The Entity Framework provider … could not be loaded - daxmax.com says:
    July 25, 2015 at 8:25 pm

    […] Source: Pinter Computing » Blog Archive » The Entity Framework provider … could not be loaded […]

    Reply
  5. Ddgen says:
    August 14, 2015 at 11:25 am

    As far as EF 6 goes, you do not have to install entity framework in the project that is referencing your entity framework project.
    All you have to do is make sure that you have the configuration entries as stated above and include the EntityFramework.dll and EntityFramework.SqlServer.dll (for the version you are using) as references in the project that is referencing the other project (the original one that uses ef6). If you have that, everything will work perfect.

    Reply
  6. albertopliego says:
    November 15, 2016 at 8:08 am

    I have this problem, but in VS2008. =/

    Reply
  7. frank says:
    April 4, 2022 at 2:32 am

    you are the man…thanks alot

    Reply
Show Comments

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Last Changes

  • Argument of type '(number | null)[]' is not assignable to parameter of type '(err: Error, result: QueryResult) => void' June 20, 2026
  • Cities: Skylines II Developer Mode June 20, 2026
  • How to stop the rain and snow in Cities: Skylines II June 20, 2026
  • 'CSII_MANAGEDPATH' has incorrect path(s) when building Cities: Skylines II mod June 20, 2026
  • Decompiling the Cities: Skylines II code June 20, 2026

Tags

.NET .NETcore 3Dprinting ASP.NET Core AutodeskInventor AWS C# Chef cloud DevOps Docker EntityFramework Games Git Go iOS iPad iPhone iPod Java Kubernetes Linux MacOSX MSSQL MVC Node.js Packer PowerShell Python RDS RightScale Ruby security Splunk TeamCity Terraform TestKitchen Tomcat Ubuntu Vagrant VirtualBox VisualStudio Windows WordPress Xcode

Recent Comments

  • Zengei László on MyHeritage családfa exportálása és küldése emailben
  • Raúl Castillo on DynDns update error
  • MICHAEL on Windows Media Player 12 cannot find the album information
  • Nargis on Configure Epson ET-3850 scanning on Windows 11
  • Venczelné Zemen Erika on Delta S2302 termosztát programozása

–

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Copyright 2026 — Pinter Computing. All rights reserved.