How can we help you today?
Entity Framework 6 throws ConfigurationErrorsException when executing operation Print
Modified on: Tue, Feb 10, 2015 at 9:07 PM
At runtime when executing a database operation (typically a query) Entity Framework throws a ConfigurationErrorsException, like below:
The additional information indicates that it failed to find or load the registered .NET Framework Data Provider.
Entity Framework probes for .NET providers by looking in the same directory as the EntityFramework assembly, deliberately avoiding the GAC. Therefore, to find the VistaDB runtime it has to be in the same directory. When the reference is added to the VistaDB runtime by NuGet to support the VistaDB Provider for Entity Framework it fails to set the Copy Local option to true. While this works at design time it will not work at runtime.
Set the Copy Local option to True for the VistaDB.5.NET40 assembly and rebuild the project.
Did you find it helpful?Send feedback