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

查看:262
本文介绍了实体框架的实体数据向导在连接到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 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尚未透露任何有用的内容。另一个这里的问题是类似的,但是在不同的地方崩溃,该用户无法使用Server Explorer进行连接。所以似乎是一个不同的情况。

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.

如何解决这个问题?

推荐答案

这是由版本不匹配引起的。

It is caused by version mismatch.

,我有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/

这里选择适用于MySQL的Ado.net驱动程序,并下载相应的版本(在这种情况下为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.

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

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