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.
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
I was getting this error message when trying to run the update-database command in package manager console against an EF code first project. When searching for this particular error message, I kept landing back on this questing but installing the EntityFramework.SqlServerCompact nuget did not resolve it in my scenario.
The solution for me was to make sure the default start up project is not set to multiple start up projects (in my case it needs to be the web project) and the default project in package manager is set to the EF project you're trying to run migrations from.
I'm posting this solution to help anyone that runs into the same issue I had as I couldn't find a solution here and this is the first question that comes up.
I'll probably be back to this question myself in a couple of months when I forget and make the same mistake!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With