1

Has anyone tried using entity framework 6.1.1 with MySQL in a new project as of late? My issue over here is that I get this error message every time I try to add an entity data model:

"Your project references the latest version of Entity Framework; however, an Entity Framework database provider compatible with this version could not be found for you data connection. Exit this wizard, install a compatible provider, and rebuild your project before performing this action"

I'm using MySQL server 5.6.21 plus I've installed both mysql-connector-net-6.9.4 and mysql-for-visualstudio-1.2.3. Along with those I've installed all the MySQL NuGet packages Developed by Oracle. But even after I rebuild the Application, everything still fails.

Development Environment Win 8.1 Pro VS-2013 Pro .Net Framework 4.5.1 EF 6.1.1.0 MySQL is on localhost.

There's this answer here which used to work for me. However, after following those instruction now the dialogue box disappears altogether. Either way, I can't update the model from the database, in fact scratch that. I can't even create it to begin with.

What I find weird is that in an old existing project I successfully managed to get working with EF6; I deleted the .edmx and tried to add it again but then it tells me the same error message.

App.config code:

<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <providers>
      <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
    </providers>
    <defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="MySql.Data.MySqlClient" />
      <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </DbProviderFactories>
  </system.data>
</configuration>

Is the upgrades to the packages that broke the system? Or is it something else I'm missing... Anyone that's managed to do this recently, I'd like to know how you did it. Any solutions?

Community
  • 1
  • 1
Offer
  • 630
  • 2
  • 11
  • 28

1 Answers1

0

It seems the problem was with the new 6.9.4 connector. I have no clue why, but when I downgraded to the MySQL .net connector 6.8.3, everything just started to work like it was supposed to. It baffles me to be honest. I highly doubt oracle would release something untested into the field so how on earth did they set it up I wonder.

Offer
  • 630
  • 2
  • 11
  • 28
  • 1
    I needed to make sure to install the connector AFTER the MySQL for .Net application. This would be consistent with your re-install. Did you try reinstalling 6.9.4 again? – William T. Mallard Nov 21 '14 at 21:33