Reputation: 7555
I have ASP.Net MVC
site where I am using MySql
as 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
Upvotes: 1
Views: 1396
Reputation: 934
Solution
You probably need to install the MySql connector, I did that and it worked. Download Connector/Net
Upvotes: 3