visual studio 2019 +EF+Mysql生成实体数据模型闪退解决方案

因为要为一个旧的应用写扩展,用Code First模式写,需要写很多代码,就想用EF6+MySql DB 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
这里通过命令安装:Install-Package MySql.Data.Entity -Version 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

参考:https://stackoverflow.com/questions/55642848/mysql-visual-studio-2019-integration

posted @ 2020-07-31 11:24  星空天宇  阅读(1384)  评论(0编辑  收藏  举报