Entity Framework 的实体数据向导在连接 MySQL 数据库时崩溃 [英] Entity Framework's Entity Data Wizard Crashes When Connecting to MySQL Database

查看:34
本文介绍了Entity Framework 的实体数据向导在连接 MySQL 数据库时崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用向导创建实体数据模型,以对现有 MySQL 数据库进行逆向工程.我进入向导的选择您的数据连接"页面,选择现有的 MySQL 连接并单击下一步",向导崩溃.具体来说,对话框只是消失,没有错误消息或任何痕迹.每一次.重新启动 VS 或 Windows 没有任何作用.

I am attempting to create an Entity Data Model using the wizard to reverse engineer an existing MySQL database. I get to the Choose Your Data Connection page of the wizard, select an existing MySQL connection and click Next, and the wizard crashes. Specifically, the dialog box just disappears without an error message or any trace. Every single time. Restarting VS or Windows does nothing.

我可以使用服务器资源管理器和相同的连接毫无问题地连接到数据库,所以我相当确信这不是连接问题.

I can connect to the database using Server Explorer and the same connection without problem, so I'm fairly confident it isn't a connection problem.

这是在安装了所有更新的 Visual Studio 2015 中,适用于 Visual Studio 的 MySQL 版本 1.2.6、EF 6.1.3 以及 MySql.Data 和 MySql.Data.Entity.EF6 版本 6.8.3.0.它是一个针对 .NET Framework 4.6.1 的控制台应用程序.

This is in Visual Studio 2015 with all updates installed, version 1.2.6 of MySQL for Visual Studio, EF 6.1.3, and MySql.Data and MySql.Data.Entity.EF6 versions 6.8.3.0. It is a Console application targeting the .NET Framework 4.6.1.

Google 尚未透露任何有用的信息.另一个 这里的问题 与昨天的类似,但在不同的点崩溃,并且该用户无法使用服务器资源管理器进行连接.所以这似乎是一种不同的情况.

Google hasn't revealed anything useful yet. Another question here from yesterday is similar, but is crashing at a different point and that user can't connect using Server Explorer. So it seems to be a different situation.

Windows 日志中没有任何帮助.

There is nothing in the Windows logs that is of any help.

我该如何解决这个问题?

How can I solve this problem?

推荐答案

是版本不匹配造成的.

在我的系统上,我有 MySQL 连接器 6.9.6.在 NuGet 包管理器控制台中发出命令:

On my system, I had MySQL Connector 6.9.6. Issuing the command in NuGet Package Manger Console:

安装包MySql.Data.Entity默认安装版本 6.9.8.您的连接器必须与 NuGet 包的实际版本匹配.您可以从以下位置下载连接器的更新版本:https://www.mysql.com/products/connector/

Install-Package MySql.Data.Entity installs version 6.9.8 by default. Your connector must match the actual version of the NuGet Package. You can download an updated version of the connector from: https://www.mysql.com/products/connector/

这里选择Ado.net driver for MySQL",下载对应版本(本例为6.9.8).重新打开 Visual Studio,现在向导不会崩溃.无需重启.

Here select the "Ado.net driver for MySQL", and download the corresponding version (in this case 6.9.8). Reopen Visual Studio and now the wizard does not crash. No reboot required.

这篇关于Entity Framework 的实体数据向导在连接 MySQL 数据库时崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆