Search code examples
c#mysqlmonodevelop

MonoDevelop (Ubuntu) and MySql


MonoDevelop and MySQL (Ubuntu Linux) not cooperating. I have followed the directions that I can find on the net to add MySql.Data.dll to the gac, and although it says its installed. "hugh@hugh-X555DG:~/Documents/MonoSQL4$ sudo gacutil -i MySql.Data.dll Installed MySql.Data.dll into the gac (/usr/lib/mono/gac)" I am unable to compile any code for MySQL.

The line "using MySql.Data.MySqlClient;" either states "using directive is unnecessary" or namespace could not be found, in either case with or without the using directive I'm unable to compile any mysql component code.

All the sites state in this case I need to add MySql.Data.dll to the gac - which I have done :-(

Am I missing something? If there's an assumed step I need to take please advise


Solution

  • You need to add the DLL that you have added to the GAC as a reference to the project.

    Right click references in the tree view and Add Reference then browse to the DLL you added to the GAC.