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.