ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0' could not be loaded

Oldergit picture Oldergit · Jun 27, 2014 · Viewed 8.3k times · Source

The Entity Framework provider type 'System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application.

Above is the error message I am getting when trying to create metadata with Breeze / Entity Framework. Nuget seems to have messed something up but it is not obvious what and it is not obvious where it is trying to read the assembly from. Any ideas would be most welcome.

Answer

Ognyan Dimitrov picture Ognyan Dimitrov · Dec 15, 2015

I had the same problem. You have installed Sql Compact but you are missing the EntityFramework extension for Sql Compact. You need to install it via package manager console or nuget package manager. The console script is :

Install-Package EntityFramework.SqlServerCompact