Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding MySQL.Data as a Reference in Visual Studio Ultimate 2010

I'm creating a new C# project. I want to connect it with the MySQL server. When I click Add Reference, MySQL.Data is not shown. This leads to all sort of problems because I can't connect it with my database.

I'm using Visual Studio Ultimate 2010 and MySQL 5.5.

Please help.

Thanks

like image 353
sean Avatar asked Jun 21 '11 09:06

sean


3 Answers

The MySql.Data dll is stored in:

Code:

C:\Program Files\MySQL\MySQL Connector Net \Assemblies

In the references window, choose the option to browse to the assembly directly.

like image 78
user1040259 Avatar answered Nov 04 '22 17:11

user1040259


MySQL isn't available "out of the box" in .NET.

You need to download the class library, and then add a reference to the class library once you've unpacked the zip file. In the "Add Reference" dialog box, go to the "Browse" tab (if I remember correctly) so that you can find the class library.

like image 21
Jon Skeet Avatar answered Nov 04 '22 16:11

Jon Skeet


If you install MySQL for Visual Studio with VS 2010 I found it here:

Add Reference > Browse > C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\MySql.Data.dll

like image 4
KCD Avatar answered Nov 04 '22 18:11

KCD