I recently upgraded/updated Entity Framework in an old project from version 4 or 5 to version 6. Now I get this exception:
An exception of type \'Syst
What worked for me was downgrading from EF 6.1.3
to EF 6.1.1
.
In Visual Studios 2012+
head over to:
Tools - Nuget Package Manager - Package Manager Console`
Then enter:
Install-Package EntityFramework.SqlServerCompact -Version 6.1.1
I did not have to uninstall EF 6.1.3
first because the command above already does that.
In addition, I don't know if it did something, but I also installed SQL Server CE in my project.
Here's the link to the solution I found:
http://www.itorian.com/2014/11/no-entity-framework-provider-found-for.html
Install Entity Framework in each project (Ex: In Web, In Class Libraries) from NuGet Package Manager orelse Open Tools - Nuget Package Manager - Package Manager Console and use Install-Package EntityFramework to install the Entity Framework.
Don't need to add the below code in every config file. By default it will be added in the project where the database is called through Entity Framework.
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
I have the same problem, the difference is I don't have access to the source code. I've fixed my problem by putting correct version of EntityFramework.SqlServer.dll in the bin directory of the application.
I also had a similar problem
My problem was solved by doing the following:
I have solved the issue using below code in my DBContext
public partial class Q4Sandbox : DbContext { public Q4Sandbox() : base("name=Q4Sandbox") { } public virtual DbSet Employees { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { var instance = System.Data.Entity.SqlServer.SqlProviderServices.Instance; } }
Thanks to a SO member.
Add "EntityFramework.SqlServer.dll" into your bin folder. Problem will get resolved.