1

I try to write application using to old MySQL database. I have VS2013 .NET 4.0 project. I installed:

mysql-for-visualstudio-1.2.4.msi
mysql-connector-net-6.9.7.msi

If I add the connection string, I successfully connect to database, but then it cannot find the proper version of EntityFramework or what? See screenshot. What should I do then?

This connector is claimed to support EF6.

Visual Studio EF6 Mysql error

references

App config:

 <entityFramework>
    <defaultConnectionFactory
       type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="v11.0" />
      </parameters>
    </defaultConnectionFactory>
    <providers>
      <provider invariantName="System.Data.SqlClient"
    type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    <provider invariantName="MySql.Data.MySqlClient"
    type="MySql.Data.MySqlClient.MySqlProviderServices,
    MySql.Data.Entity.EF6, Version=6.9.7.0,
    Culture=neutral, PublicKeyToken=c5687fc88969c44d">
   </provider>
 </providers>

Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
  • 1
    Does your application configuration contain a value at `entityFramework` > `providers` > `provider invariantName="MySql.Data.MySqlClient"`? See also [Can't use a MySQL connection for entity framework 6](http://stackoverflow.com/questions/21206184/cant-use-a-mysql-connection-for-entity-framework-6). – CodeCaster Aug 10 '15 at 14:44
  • I think so. Please see updated question. – Tomas Kubes Aug 10 '15 at 14:48

1 Answers1

0

Solved, I restarted Visual Studio and now it works. Rebuild is not enough.

Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148