.netentity-framework

No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'


After downloading EF6 via NuGet and trying 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.

My connection string code is:

<connectionStrings>
    <add name="RaptorDB"
        connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=RaptorDB;Integrated Security=True"
        providerName="System.Data.SqlClient" />
</connectionStrings>

enter image description here

How can I resolve this error?


Solution

  • I just got into the same problem and it looks like EntityFramework although installed from NuGet Package Manager was not correctly installed in the project.

    I managed to fix it by running the following command on Package Manager Console:

    PM> Install-Package EntityFramework