简体   繁体   English

找不到类型或名称空间名称“ MySql”(您是否缺少using指令或程序集引用?)c#VS 2013

[英]The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) c# VS 2013

I added reference to MySql.Data.dll from mysql connector 6.9.10 installation. 我从mysql连接器6.9.10安装中添加了对MySql.Data.dll的引用。 But still i get error: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference?) using c# in VS 2013 但仍然出现错误:在VS 2013中使用c#找不到类型或名称空间名称'MySql'(您是否缺少using指令或程序集引用?)

On the *.cs file you are trying to use the MySql connector, you need a Using Statement. 在试图使用MySql连接器的* .cs文件上,您需要一个Using语句。

Go to the line that you have the error on, the red squiggly. 转到错误所在的行,红色弯曲。 put the cursor on the word and press Ctrl . 将光标放在单词上,然后按Ctrl。 (period) You'll be presented with an option to add the using statement to the top of the file. (句点)将为您提供一个将using语句添加到文件顶部的选项。

The problem was with the version incompatibility of .Net and Mysql i was using. 问题是我正在使用的.Net和Mysql的版本不兼容。 My project is compiled with .net 3.5 and am trying to use Mysql.data dll from connector 6.9. 我的项目是使用.net 3.5编译的,正在尝试使用连接器6.9中的Mysql.data dll。 Issue resolved after using dll from MySql connector 6.3.9/v2.0. 使用MySql连接器6.3.9 / v2.0中的dll后解决的问题。 Too bad that the error is misleading. 太糟糕了,该错误会引起误解。

暂无
暂无

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

相关问题 c#错误1找不到类型或名称空间名称”(是否缺少using指令或程序集引用?) - c# Error 1 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?) C#:找不到类型或名称空间名称“?Attribute”(是否缺少using指令或程序集引用? - C#:The type or namespace name '?Attribute' could not be found (are you missing a using directive or an assembly reference? 找不到类型或命名空间名称“ScriptName”(您是否缺少 using 指令或程序集引用?)修复 unity c# - The type or namespace name 'ScriptName' could not be found (are you missing a using directive or an assembly reference?) fix unity c# C#:找不到类型或名称空间名称“类”(是否缺少程序集引用的using指令?) - C#: The type or namespace name 'class' could not be found(are you missing a using directive for an assembly reference?) CS0246:找不到类型或命名空间名称'MySql'(您是否缺少using指令或程序集引用 - CS0246: The type or namespace name 'MySql' could not be found (are you missing a using directive or an assembly reference C# 错误 CS024 找不到类型或命名空间名称“Form1”(您是否缺少 using 指令或程序集引用?) - C# Error CS024 The type or namespace name 'Form1' could not be found (are you missing a using directive or an assembly reference?) C# 错误:错误 CS0246 找不到类型或命名空间名称“”(您是否缺少 using 指令或程序集引用?) - C# Error: Error CS0246 The type or namespace name '' could not be found (are you missing a using directive or an assembly reference?) CS0246 C#找不到类型或名称空间名称“ ForeignKeyAttribute”(是否缺少using指令或程序集引用?) - CS0246 C# The type or namespace name 'ForeignKeyAttribute' could not be found (are you missing a using directive or an assembly reference?) 如何解决C#错误“找不到类型或名称空间名称'[x]'(您是否缺少using指令或程序集引用?)” - How to fix C# error “The type or namespace name '[x]' could not be found (are you missing a using directive or an assembly reference?)” C# 错误 CS0246 找不到类型或命名空间名称“Socket”(您是否缺少 using 指令或程序集引用) - C# error CS0246 The type or namespace name 'Socket' could not be found (are you missing a using directive or an assembly reference)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM