Bug #74361 Problem with Microsoft Entity Framework 6 and MySql
Submitted: 13 Oct 2014 18:07 Modified: 30 Apr 2015 17:01
Reporter: Liam Flavelle Email Updates:
Status: No Feedback Impact on me:
None 
Category:Connector / NET Severity:S1 (Critical)
Version:5.9.4 OS:Windows
Assigned to: Assigned Account CPU Architecture:Any
Tags: entityframework

[13 Oct 2014 18:07] Liam Flavelle
Description:
I am trying to use MySql from VS 2013, and am getting the following error:

Your project references the latest version of Entity Framework; however an Entity Framework database provider compatible with this version could not be found for your data connection.

I would be grateful for any thoughts?

How to repeat:
1. I have installed the .Net Connector 6.9.4 from your website
2. Created a new class project in VS 2013
3. Added Entity Framework 6 via Nuget (vs 6.1.1)
4. Added the references to the Connector 6.9.4\Assemblies\v4.5 dlls:
    MySql.Data.dll
    MySql.Data.Entity.EF6.dll
    MySql.Web.dll
5. Add a new ADO.Net Entity Data Model to the project
6. Select EF Designer from database
7. Entered a connection string
[20 Oct 2014 16:02] Fernando Gonzalez.Sanchez
Hi,

After installing EF6 thru nuget, it will modify your app.config, after that edit the providers entries to register MySql EF6 provider like this:

<entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, 
        MySql.Data.Entity.EF6" />
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, 
        EntityFramework.SqlServer" />
    </providers>
  </entityFramework>

The rebuild the solution, then when you open again the EF designer, it will correctly detect in MySql EF6 provider (EF Designer looks for it in the bin output folder + the registration in app.config).

For all the details, see http://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html

Thanks.
[21 Nov 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[28 Feb 2015 16:42] Hong Tan
I ran into the same issue.  After replacing the entity framework in web.config, everything started working.
[31 Mar 2015 10:20] Ankounia Mamanou
Hi,

Althought my web solution (VS 2013 Community) is connected to my database (Community version 5.6.22), i cannot access to the database objects selection window.
I still wonder why...
Can you help me ?
[31 Mar 2015 17:01] Fernando Gonzalez.Sanchez
Hi,

Do you have Visual Studio Integration installed?
https://dev.mysql.com/downloads/windows/visualstudio/

Also, if you are planning to use Visual Studio integration, Connector/NET itself must be installed from installer, rather than thru nuget (because nuget does not register DbProviderFactory in machine.config, only MSI does it).
[1 May 2015 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".