Click here to Skip to main content
11,496,146 members (160 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
See more: MySQL Win7 VisualStudio
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 11-Jan-11 6:03am
Maxdd 71.5K
Edited 11-Jan-11 6:22am
v3
  Permalink  
v2
Comments
Maxdd 7 at 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 at 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
  Permalink  
Comments
Maxdd 7 at 11-Jan-11 11:21am
   
Can you please clarify?
Espen Harlinn at 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
  Permalink  
Comments
Wes Aday at 29-Jul-12 9:42am
   
Exactly how is this an answer to this over year old question?
Sandeep Mewara at 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)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 29 Jul 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100