Mysql net Connector and Entity Framework problem

Asked

Viewed 1,690 times

1

When I install the mysql connector in version 6.9.11, I can see the driver for ADO.Net, so far so good.

inserir a descrição da imagem aqui

But when I try to create the template I get the following error: inserir a descrição da imagem aqui

Now when I install the 6.10.6 connector version, I can’t see the driver for ADO.Net and I can’t connect either.

Data for help:

Mysql for Visual Studio => 2.0.5 M4

Mysql Connector/Net => 6.9.11

Visual Studio 2017 => 15.5.4

Note. I’ve tried using Mysql for Visual Studio 1.2.7 and I don’t get results either.

1 answer

1


I was able to solve it by following the steps of answering a question from Soen. Link: https://stackoverflow.com/questions/42748396/mysql-is-not-appearing-in-choose-data-source-for-visual-studio-2017

Steps with some changes to the links, following the original.

Note: follow the steps in the same order.

Uninstall / remove "Connector/NET" and "Mysql to Visual Studio" if installed.

Install "Mysql for Visual Studio" v2.0.5 M4 (Mysql to Visual Studio). Note: Install Mysql to Visual Studio before Connector/NET.

Install "Connector/NET" V6.9.11 (Connector/Net).

Note: I tried using Connector/NET V6.8, V6.10 and V8 first, but none of them worked with Visual Studio 2017 and ADO.Net. Here you can find all Visual Studio IDE Connector Versions and Compatibilities , but so far this list is inaccurate. (True)

Note: until this step, you should be covered, but you will find the Entity Framework issues, follow the next steps to completely configure your environment and you should be ready to go.

Download and install "Entityframework" V6.2.0 through Nuget, going to the Project Tab / Manage Nuget Packages / Browse -> Entity Framework.

Add references to C: Program Files (x86) Mysql Connector.NET 6.9.11 Assemblies v4.5 Mysql.Data.dll and C: Program Files (x86) Mysql Connector.NET 6.9.11 Assemblies v4.5 Mysql.Data.Entity.EF6.dll; by right clicking on References within the Solution Explorer and selecting Add Reference / Browse -> Browse button.

Add Mysql EF6 provider information within App.config under entity structure vendors, as follows:

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

Rebuild the project by going to Build tab / Rebuild Projectname. And that’s it. VS2017 is ready to go. I hope this works for everyone, as it did for me today.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.