1

In my project I had MySql.Data.Entity.6.10.8 with MySql.Data.8.0.13. I saw this post: dbconnection-to And uninstalled MySqlData.Entity.6.10.8 and installed mySql.Data.EntityFramework.

My project now is with all 8 versions :

<package id="MySql.Data" version="8.0.13" targetFramework="net46" />
  <package id="MySql.Data.EntityFramework" version="8.0.13" targetFramework="net46" />
  <package id="MySql.Data.EntityFrameworkCore" version="8.0.13" targetFramework="net46" />
  <package id="MySql.Data.EntityFrameworkCore.Design" version="8.0.13" targetFramework="net46" />

But, in web.config file I need a ef providers configuration and I got this from MySql:

    <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>

And I got this error:

The Entity Framework provider type 'MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6' registered in the application config file for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient' could not be loaded.

How can I change this ef provider configuration? Or I need to install another package?

I tried to change to:

<provider invariantName="MySql.Data.MySqlClient"
            type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework"/>

And I received an error: "Unknow host"

Neumann
  • 319
  • 2
  • 14

0 Answers0