Unable to find the requested .Net Framework Data Provider. It may not be installed

ef-code-first ef-migrations entity-framework entity-framework-6


This morning I suddenly got this exception when trying to add a custom migration step to our EF Code-first migrations:

The ADO.NET provider with invariant name '.NET Framework Data Provider for SQL Server' is either not registered in the machine or application config file, or could not be loaded.

I have no problem executing a update-database against our SQL Server but the add-migration command fails.

We are using.Net 4.5.1 with EF Code First 6.0.1 against SQL Server 2012.

Our configuration file for our data project is this:

<?xml version="1.0" encoding="utf-8"?>
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
        <parameter value="System.Data.SqlClient" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    <add name="Data.StorageContext" connectionString="server=.\MSSQL01;Database=OutageTracking; Integrated Security=True; MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />

Note that Visual Studio 2012 complains about the -element in the -section.

Any thoughts?



3/17/2014 1:25:05 PM

Accepted Answer

".NET Framework Data Provider for SQL Server" is not an invariant name, so some .config file somewhere must be in a bad state

12/9/2013 3:55:16 PM

Related Questions


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow