问题描述
几年前,我将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:
Error1The 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名称空间(...)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!