简体   繁体   English

添加 ADO.NET 实体模型崩溃

[英]adding ADO.NET Entity Model crash

I'm trying to add ADO.NET Entity Model to a new project.我正在尝试将 ADO.NET 实体模型添加到新项目中。

Chose EF Designer from database, chose the database (on another server, tried 2 server one with mysql 5.6 and one with 5.7) and press continue and the the flow crash.从数据库中选择 EF Designer,选择数据库(在另一台服务器上,尝试了 2 个服务器,一个使用 mysql 5.6,一个使用 5.7),然后按继续,流程崩溃。 tried it several times with different server and versions.用不同的服务器和版本尝试了几次。

I installed all the latest versions of mySQL connection and EF.我安装了所有最新版本的 mySQL 连接和 EF。

Checked if there are error in the event viewer but couldn't fine errors or warnings at all.检查事件查看器中是否有错误,但根本无法解决错误或警告。

I'm trying to add ADO.NET Entity Model to a new project.我正在尝试将ADO.NET实体模型添加到新项目中。

Chose EF Designer from database, chose the database (on another server, tried 2 server one with mysql 5.6 and one with 5.7) and press continue and the the flow crash.从数据库中选择EF Designer,选择数据库(在另一台服务器上,尝试2台服务器使用mysql 5.6,另一台使用5.7),然后按Continue,然后流程崩溃。 tried it several times with different server and versions.在不同的服务器和版本上尝试了几次。

I installed all the latest versions of mySQL connection and EF.我安装了所有最新版本的mySQL连接和EF。

Checked if there are error in the event viewer but couldn't fine errors or warnings at all.检查事件查看器中是否有错误,但是根本无法处理错误或警告。

I had same mistake.我有同样的错误。 The reason was in the difference between mysql-connector-net version and MySQL.Data.Entity version.原因在于 mysql-connector-net 版本和 MySQL.Data.Entity 版本之间的差异。 I uninstalled mysql-connector-net, then installed correct version, and the wizard started to work normally.我卸载了mysql-connector-net,然后安装了正确的版本,向导开始正常工作。

Hello I tried this today.你好,我今天试过了。 I like to share my solution working for VS 2017. First install MySQL for Visual Studio.我喜欢分享我为 VS 2017 工作的解决方案。首先为 Visual Studio 安装 MySQL。 Then install the MySQL Connector 6.10.7.然后安装 MySQL 连接器 6.10.7。 Now you are able to do everything else: Inside your project install some NuGets MySQL.Data and the MySQL.Entity: Both with version 6.10.7.现在您可以执行其他所有操作:在您的项目中安装一些 NuGets MySQL.Data 和 MySQL.Entity:两者的版本均为 6.10.7。 The VS 2017 does not close anymore and the model window is opened. VS 2017 不再关闭并打开模型窗口。

I Hint also first install MySQL for Visual Studio.我提示还首先为 Visual Studio 安装 MySQL。 Then install the connector.然后安装连接器。 This solves two issues: You can use MySQL in Visual Studio and you connect stable to a database.这解决了两个问题:您可以在 Visual Studio 中使用 MySQL,并且您可以稳定地连接到数据库。

Please, ensure what 3per mentions: MySQL.Data and MySQL.Data.Entity has to the same version.请确保 3per 提到的内容:MySQL.Data 和 MySQL.Data.Entity 具有相同的版本。

Hope this helped others a lot.希望这对其他人有很大帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM