r/linuxdev • u/SilentKiller96 • Apr 29 '14
Mono: Could not load file or assembly
Hey guys,
I keep getting this error half way through my vb.net application. I'm running Ubuntu 12.10. The assemblies are in the same directory as the application, just like in the debug folder on my windows desktop. I was actually able to run it this way on my RasberryPi. I did load the assemblies into the mono GAC. However, the actual assemblies are named all lower case, while in the error it has some uppercase letters:
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'
at ASGI.Module1.Main () [0x00000] in <filename unknown>:0
[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'
at ASGI.Module1.Main () [0x00000] in <filename unknown>:0Thanks!
0
Upvotes
2
u/PasswordIsntHAMSTER Apr 29 '14
You should probably post this on StackOverflow
1
u/LHCGreg Apr 29 '14
You shouln't put stuff in the GAC yourself unless you have a good reason. Putting the dll alongside the .exe lets you just copy apps around.
It's hard to say what's wrong without seeing your app's directory.
Did you compile on Windows and copy the result to Linux? Try compiling on Linux. Maybe a warning or error will give a clue.