Mysql does not appear in the "Select Data Source" section for Visual studio 2017

As you can see, I already installed the necessary mysql packages, such as Mysql for Visual studio and Connector / NET, but regardless of the fact that mysql does not appear in Visual Studio 2017 Data source menu, any suggestion ?: enter image description here

enter image description here

+5
source share
3 answers

I had the same situation when setting up Visual Studio Professional 2017 with MySQL, ADO.NET (Database First) and EF6.

Note. Please follow the instructions in the same order.

Note. You should be covered before this step, but you will run into Entity Framework problems by following the following steps to fully customize your environment and you should be good to go.

  1. Create a new Visual Studio Professional 2017 project.

  2. Download and install “EntityFramework” v6.2.0 via NuGet by going to the “Project” / “Package Management NuGet / Browse → Entity Framework” tab.

  3. Add links to C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.dll as well as C:\Program Files (x86)\MySQL\Connector.NET 6.9.10\Assemblies\v4.5\MySql.Data.Entity.EF6.dll ; by right-clicking on the links in Solution Explorer and selecting Add Link / Browse → Browse.

  4. Add MySQL EF6 provider information inside App.config for entity infrastructure providers:

 <entityFramework> <providers> <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> </providers> </entityFramework> 
  1. Rebuild the project by going to the Build / Rebuild ProjectName tab.

What is it. VS2017 is ready to go. I hope this works for everyone, as it does for me today.

Literature:

+10
source

The native MySQL .net connector does not yet support Visual Studio 2017. On the MySQL forums, they waited about three months to wait until the updated connector is ready, meanwhile Devart has one that works with MySQL and is compatible with VS2017.

Edit

There is built-in MySQL support for Visual Studio 2017. Additional information: https://dev.mysql.com/doc/visual-studio/en/visual-studio-install.html

+2
source

try the following:

---> install EntityFramework 6.2.0 via nuget.

---> Check in the web.config / app.config file that you have the System.Data.SqlServerCe.4.0 provider. if it is not installed, then install it via nuget, the same version as the previously installed entity infrastructure (in this case, 6.2.0).

---> then add the links: (in this case, from the / NET connector version 6.9.10) C:\Program Files (x86)\MySQL\Connector.NET 6.9\Assemblies\v4.5\MySql.Data.dll and C:\Program Files (x86)\MySQL\Connector.NET 6.9\Assemblies\v4.5\MySql.Data.Entity.EF6.dll and rebuild.

---> try adding this provider to the object line in the web.config / app.config file: <provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6" /> rebuild again.

---> and finally try adding a .edmx file with a new connection.

This worked in my case when I installed VS2017 and MySQL in a completely new laptop and had the same problem.

0
source

Source: https://habr.com/ru/post/1265353/


All Articles