I cannot seem to resolve what appears to be a common issue with Entity Framework 6. I have reviewed the many topics related to this issue on SO, and am unable to find a solu
For me, this issue is caused by damaged EntityFramework. Uninstall EntityFramework as well as Visual Studio and Re-Installing the Visual Studio - The visual studio installation covers the .Net Framework SDK installation kind of resolved this issue.
You have this:
<add name="ReadContext"
connectionString="Server=Sql2014intsnace;Database=database;User Id=secret; Password=secret;"
providerName="System.Data.SqlClient;" /> <-- semi-colon
It should be this:
<add name="ReadContext"
connectionString="Server=Sql2014intsnace;Database=database;User Id=secret; Password=secret;"
providerName="System.Data.SqlClient" /> <-- no semi-colon
Otherwise, you're telling ADO to find a provider named System.Data.SqlClient;
- there isn't one.
I got this error but for me, it was something entirely different. I was able to solve it by looking at only Unable to find the requested .Net Framework Data Provider
and finding this answer.
I then had to edit:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config
And:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
Searching for DbProviderFactories
both configs looked like this:
<system.data>
<DbProviderFactories>
<add name="IBM DB2 for i .NET Provider" invariant="IBM.Data.DB2.iSeries" description=".NET Framework Data Provider for IBM i" type="IBM.Data.DB2.iSeries.iDB2Factory, IBM.Data.DB2.iSeries, Version=12.0.0.0, Culture=neutral, PublicKeyToken=9cdb2ebfb1f93a26" />
</DbProviderFactories>
<DbProviderFactories />
</system.data>
When I removed the trailing <DbProviderFactories />
everything started working again.