This error means that mono could not find the library from which one of the classes you are trying to use.
To maintain compatibility with the .NET Framework, mono uses the same library names as windows. These names are mapped to linux library names using DllMaps.
(Replace ".so" with "dylib" for MacOS X)
If the library location is not explicitly specified in the DllMap entry in the application or assembly .config file, Mono will look for the library in several places:
The directory in which the link image is loaded. Anywhere, the system dynamic loader is configured to search for shared libraries. For example, on Linux, this is indicated in the environment variable $ LD_LIBRARY_PATH and the file /etc/ld.so.conf. Instead, the $ PATH environment variable is used instead. The next step in solving the problem is to find the file in your system.
$ find / usr -name libgdiplus.so /usr/local/lib/libgdiplus.so Aha! Here it is. So why can not mono find it?
By default, basically all linux distributions, the dynamic linker only creates a cache for files in / lib and / usr / lib. Since you placed your library in / usr / local / lib, it does not know about it. You can verify this using the following command:
ldconfig -p | grep libgdiplus The command should not display the result because it does not know about the file.
The correct way to fix this problem is to add / usr / local / lib as one of the paths that index ldconfig. To do this, add the path to /etc/ld.so.conf and run "ldconfig" as root, which will cause the cache to be rebuilt.
Now the dynamic linker should know about all the libraries in this path. You can verify this by typing the above command again:
$ ldconfig -p | grep libgdiplus libgdiplus.so (libc6) => /usr/local/lib/libgdiplus.so Hooray! Your application should now work correctly.
NOTE. As mentioned above, you can also set the environment variable $ LD_LIBRARY_PATH to the path containing the library, but this is not recommended because it can cause other problems and is more difficult to maintain.
For more information, see http://www.mono-project.com/docs/advanced/pinvoke/dllnotfoundexception/