找不到MySQL名称空间(...) [英] MySQL namespace could not be found (...)

查看:372
本文介绍了找不到MySQL名称空间(...)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几年前,我将MySQL与VS一起使用MySQL,因此对这个问题表示歉意.以下是我的资料:

win7 x64
VS 2010

并安装了连接器6.3.6和社区服务器.使用GUI后,看起来像mysql服务器运行正常.

我很惊讶没有找到要复制的mysql文件(.dll),因此当我查看文档时发现它已集成到VS 2010中(我认为我没有错)-尽管我尝试放置一些我发现的dll在bin目录中,但没有成功.

为了进行测试,我使用.NET 4.0创建了一个新网站(也尝试使用3.5),在服务器资源管理器中添加了连接(一切正常),但是当我编译时,得到:


错误1找不到类型或名称空间名称"MySql"(您是否缺少using指令或程序集引用?)



使用MySql.Data.MySqlClient;
使用MySql.Data.Types;

我该如何解决这个问题?

我已经重新安装了连接器并重新启动了计算机,但是参考MySQL仍然不起作用.

I used MySQL with VS some years ago, so apologies for that question. Is the following, I have:

win7 x64
VS 2010

and installed connector 6.3.6 and the community server. After using the GUI looks like mysql server is running ok.

I was surprised not finding mysql file to copy (the .dll), so when I took a look at documentation I found that it''s integrated in VS 2010 (I think im not wrong) - altough I tried place some dlls I found at bin directory but no sucess.

Just for test I created a new website with .NET 4.0 (also tried 3.5), on server explorer I added the connection (all ok) but when I compile I get:


Error 1 The type or namespace name ''MySql'' could not be found (are you missing a using directive or an assembly reference?)

at

using MySql.Data.MySqlClient;
using MySql.Data.Types;

How can I solve this problem?

I already reinstaled the connector and rebooted the computer, but the reference MySQL still dont work.

推荐答案

这将为您提供帮助

找不到命名空间名称"MySql" [类型或名称空间名称< Type/Namespace>找不到 [^ ] (尝试所有步骤,就这么简单)
This will help you

Namespace name ''MySql'' could not be found[^]

General error

The Type or Namespace Name <Type/Namespace> Could Not be Found[^] (Try the steps, that''s all)


从此处下载
http://dev.mysql.com/downloads/connector/net/1.0.html [ ^ ]

新程序集-删除旧参考并添加对新程序集的引用

问候
Espen Harlinn
Download from here
http://dev.mysql.com/downloads/connector/net/1.0.html[^]

New assembly - delete old reference and add reference to new assembly

Regards
Espen Harlinn


我正在尝试将Visual Studio与mysql连接,但询问mysql.dll,我不知道如何创建或连接
i am trying to connect my visual studio with mysql but its asking mysql.dll i dont know how to create or connect


这篇关于找不到MySQL名称空间(...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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