How to Fix JetEntityFrameworkProvider Registration Error in EF6 Projects

Are you trying to install JetEntityFrameworkProvider for your WinForms project and encountered the following error?

Unable to determine the provider name for provider factory of type 'JetEntityFrameworkProvider.JetProviderFactory'. Make sure that the ADO.NET provider is installed or registered in the application config.

Ensure the provider factory is registered in the app.config or web.config files for all projects that use EF6 in your solution. If your solution consists of just one project, adding the following snippet to your project’s config file should resolve the issue. However, if your solution includes multiple projects, make sure to add this snippet to each project.

Here’s an example of how to register the provider factory in your config file:

<configuration>
  ...

  <system.data>
    <DbProviderFactories>
    <add name="JetEntityFrameworkProvider" invariant="JetEntityFrameworkProvider" description="JetEntityFrameworkProvider" type="JetEntityFrameworkProvider.JetProviderFactory, JetEntityFrameworkProvider, Version=6.0.0.0, Culture=neutral, PublicKeyToken=756cf6beb8fe7b41" />
    </DbProviderFactories>
  </system.data>

  ...
</configuration>

Also, ensure that your configuration gets build along the main executable. You should this config file next to your executable:

A Windows Explorer window displaying two files in the bin directory: myapp.exe and myapp.exe.config, showing that the application’s executable and corresponding configuration file are present.
Screenshot illustrating the WinForms application file (myapp.exe) and its config file (myapp.exe.config) after a successful build.

Alos, make sure your build process doesn’t delete *.config! Which was true in my case 😉

A screenshot showing a Visual Studio post-build event command line that deletes .xml, .pdb, and .config files from the output directory. The .config file entry is crossed out, indicating its removal.
The post-build event script deleting configuration and other files from the bin folder.