简体   繁体   English

成员MySql.Data.MySqlClient.MySqlException,MySql.Data没有解析ASP.NET MVC Type

[英]ASP.NET MVC Type is not resolved for member MySql.Data.MySqlClient.MySqlException,MySql.Data

I added a new property to my model of an ASP.NET MVC 5.2 application with MySQL database, and now I'd like to add a database migration for this by using this command: 我在我的带有MySQL数据库的ASP.NET MVC 5.2应用程序模型中添加了一个新属性,现在我想使用此命令为此添加数据库迁移:

Add-Migration RegisterPropertyAdded

But, I get an exception: 但是,我得到一个例外:

Type is not resolved for member MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.9.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d 成员MySql.Data.MySqlClient.MySqlException,MySql.Data,Version = 6.9.7.0,Culture = neutral,PublicKeyToken = c5687fc88969c44d未解析类型

It seems that MySQL wants to throw an exception but can't find the exception class for reasons I don't understand. 似乎MySQL想要抛出异常,但由于我不理解的原因而无法找到异常类。 I installed the following NuGet packages in the project: 我在项目中安装了以下NuGet包:

EntityFramework Version 6.1.3 EntityFramework版本6.1.3

MySql.Data Version 6.9.7 MySql.Data版本6.9.7

MySql.Data.Entities, Version 6.8.3.0 MySql.Data.Entities,版本6.8.3.0

MySql.Data.Entity Version 6.9.7 MySql.Data.Entity版本6.9.7

In the model, the class MySql.Data.MySqlClient.MySqlException is shown, so it seems like the class exists and I can't find any information that additional packages are required for the exception class. 在模型中,显示了类MySql.Data.MySqlClient.MySqlException ,因此看起来该类存在,并且我找不到任何有关异常类需要其他包的信息。

In order to see this exception you have to update MySQL Connector/Net 要查看此异常,您必须更新MySQL Connector / Net
Also make sure that MySQL server is up and running and you can connect to it. 还要确保MySQL服务器已启动并运行,您可以连接到它。

对我来说,由于Web.config中的连接字符串不正确而出现此消息。

暂无
暂无

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

相关问题 成员'MySql.Data.MySqlClient.MySqlException,MySql.Data,Version = 6.8.8.0,Culture = neutral,PublicKeyToken = c5687fc88969c44d'的类型未解析 - Type is not resolved for member 'MySql.Data.MySqlClient.MySqlException,MySql.Data, Version=6.8.8.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' 异常未处理,MySql.Data.MySqlClient.MySqlException - Exception Unhandled, MySql.Data.MySqlClient.MySqlException 错误 MySql.Data.MySqlClient.MySqlException - Error MySql.Data.MySqlClient.MySqlException MySql.Data.MySqlClient.MySqlException:超时已过期 - MySql.Data.MySqlClient.MySqlException: Timeout expired 发生了'MySql.Data.MySqlClient.MySqlException'类型的异常 - An exception of type 'MySql.Data.MySqlClient.MySqlException' occurred MySql.Data.MySqlClient.MySqlException'发生在MySql.Data.dll中 - MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll MySql.Data.dll中发生类型为'MySql.Data.MySqlClient.MySqlException'的异常,但未在用户代码中处理 - An exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll but was not handled in user code MySql.Data.dll中发生类型为'MySql.Data.MySqlClient.MySqlException'的第一次机会异常 - A first chance exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll 错误! mysql.data.mysqlclient.mysqlexception(0x80004005) - Error! mysql.data.mysqlclient.mysqlexception(0x80004005) C# MySql.Data.MySqlClient.MySqlException (0x80004005) - C# MySql.Data.MySqlClient.MySqlException (0x80004005)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM