Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted
Updated 11-Jan-11 5:22am
v3

 
Share this answer
 
v2
Comments
Maxdd 7 11-Jan-11 11:20am    
Unfortunately not, because as I said, is dll are integrated with VS. Anyway some hours ago I tested and it wont work either using the dll's.
thatraja 11-Jan-11 11:27am    
replace dlls & rebuild, that you need to do
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
 
Share this answer
 
Comments
Maxdd 7 11-Jan-11 11:21am    
Can you please clarify?
Espen Harlinn 11-Jan-11 11:26am    
You have a new installation - and a new installation of the latest connector for .Net. This implies that the referenced dll's are no longer the one's you want to use. You need to reference the new version of the dll's
i am trying to connect my visual studio with mysql but its asking mysql.dll i dont know how to create or connect
 
Share this answer
 
Comments
[no name] 29-Jul-12 9:42am    
Exactly how is this an answer to this over year old question?
Sandeep Mewara 29-Jul-12 13:25pm    
If you have any issue... create a new question and ask there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900