Problem with running MySQL Connector simple applicaton on MONO
Hello,
I have Ubuntu Linux with MONO installed (MONO JIT compiler version 3.2.8 Debian 3.2.8+dfsg-4ubuntu1), and I have installed the MySQL connector 6.8.3.0. I have followed all installation instructions, and after some problems I finally added the MySql.Data.dll to GAC and I have managed to compile my simple C# code with gmcs. The code uses MySqlConnection class to connect to the database.
The problem is that when I run my compiled application I get the following error:
Unhandled Exception:
System.TypeLoadException: Could not load type 'MySql.Data.MySqlClient.MySqlConnection' from assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type 'MySql.Data.MySqlClient.MySqlConnection' from assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'.
The assembly MySql.Data.dll is present in GAC, when I remove it from GAC I get a different error running my application:
Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.
File name: 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies.
File name: 'MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d'
Can anybody suggest me the way to go to solve the issue? I've been working hard on it since a while...
Any help higlhy appreciated.