Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MySQL Visual Studio 2019 Integration

I switch to Visual Studio 2019 and when I tried to install MySQL for VS in order to use Entity Framework, I didn't saw the 2019 version.

I used the following link : Link to MySQL Addon and Connector

Is there any way to get the MySQL functionality in VS2019 or am I doing something wrong?

Thanks,

and as proof of concept MySQL installer

like image 778
Albert Alonso Avatar asked Feb 04 '23 19:02

Albert Alonso


1 Answers

After a lot of attempts, I've found this way to make vs2019 working with MySql and EF6, at least regarding "Database First".

1) Remove mysql for visualstudio

2) Remove mysql connector net

3) Install mysql for visualstudio 2.0.5

4) install mysql connector net 6.10.8

5) Create a new C# project using framework 4.5.2

6) Via Nuget, add Microsoft Entity Framework 6.2.0

7) Via Nuget, add MySql.Data.Entity 6.10.8

8) Open App.config. There are errors in the row:

<provider invariantName="MySql.Data.MySqlClient" ...

add the missing '/' at the end and delete '</provider>'

9) Build the solution

Now add a new ADO.Net Entity Data Model and you should be able to work with your mysql database

like image 105
il Giovine Avatar answered Feb 06 '23 14:02

il Giovine