Kgn-web
Kgn-web

Reputation: 7555

Type is not resolved for member 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.8.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'

I have ASP.Net MVC site where I am using MySqlas database with Entity Framework

When running the following command on Nuget Package Manager Console

Enable-Migrations -force

Getting the error

Type is not resolved for member 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.8.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'

Here is how my Web.Config looks like.

<connectionStrings>
<add name="mb_databaseContext" providerName="MySql.Data.MySqlClient" connectionString="Server=.\localhost;port=8080;database=myDb;uid=root;password=" /></connectionStrings>

 <entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
  <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" />
</providers>

Please note MySql is running as

localhost:8080/phpmyadmin

Upvotes: 1

Views: 1396

Answers (1)

Edvaldo Silva
Edvaldo Silva

Reputation: 934

Solution

You probably need to install the MySql connector, I did that and it worked. Download Connector/Net

Upvotes: 3

Related Questions