Recently, due to work needs, it is necessary to re-modify the middle of the ADO.NET entity data model.
1. Visual Studio 2017 cannot open MySQL&MaraiDB related .edmx files in entity design mode, and the following error occurs:
How to solve:
1. Make sure Entity Framework 6 tools are installed
If it is installed, skip step 1 directly. If it is not installed, go to Tools-->Get Tools and Features (Modify Visual Studio)-->Single Components, check Entity Framework 6 Tools, and install it.
2. Install the corresponding versions of Connector/Net and MySQL for Visual Studio
Find the supported version of Visual Studio 2017. Here I choose mysql-for-visualstudio-1.2.7.msi & Connector/Net 6.9.11 . After the installation is complete, restart VisualStudio and then open the .edmx file corresponding to MariaDB&MySQL in design mode
PS:
1. Installation is to pay attention to the version in the table to install
2. If you can't find the corresponding version, you can try to click to view the historical version, and then download the corresponding version for installation
3. When installing, pay attention to select the check:
Connector/Net: 勾选 Enity Framework Support
mysql-for-visualstudio Check: Visual Studio Integration and Entity Framework Designer Intgration for the specified Visual Studio version
As shown in the figure:
If you are not sure how to deal with it, please select the complete installation.
2. Visual Studio 2017 but cannot perform operations such as updating the entity model according to the MySQL or MariaDB database