Sunday, August 24, 2014

No Entity Framework provider found for 'MySql.Data.MySqlClient' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file.



Upgrading to EntityFramework6 has been a nightmare. There has been almost no useful documentation for how to get everything up and running with MySql. I downloaded the connectors, the MySql plugin for Visual Studio, and Entity Framework 6.1.1. Still, I kept receiving this error:

"No Entity Framework provider found for 'MySql.Data.MySqlClient' ADO.NET provider. Make sure the provider is registered in the 'entityFramework' section of the application config file."

The problem here was that I had two different projects in my solution file. One was the source code, one was tests. The test project was not importing the same dependencies for MySql.Data that the source code had. The solution I did was the following:


  1. Right click on the Solution (top level in the solution explorer)
  2. Manage Nuget packages for solution
  3. Go to Installed tab
  4. For all of the EntityFramework related packages (MySql.Data, MySql.Data.Entities, MySql.ConnectorNET.Entity and MySql.ConnectorNET.Data), select them then select the "Manage" button.
  5. Enable each package for all projects.

1 comment:

  1. Thanks for this mini help dude. I am learning to be a an expert in technical stuff and your blog has been a great tool to make me better at it.

    ReplyDelete