[Mono-list] DDllImport .config file does not work

Jonathan Pryor jonpryor at vt.edu
Tue Sep 19 21:34:03 EDT 2006

On Tue, 2006-09-19 at 16:26 -0400, David Abrames wrote:
> I have created a library that wraps an API that has a Windows.DLL and Linux
> Shared Object. According to the "Interop with Native Libraries" I can use a
> per-assembly .config file to map the Windows DLL name to the Linux Shared
> Object name.  However I can't get it to work.
> When I run my application I get a Dll Not Found Exception on the Windows
> DLL.  The name of my wrapper library is MyAPILib.dll and the .config file is
> called MyAPILib.dll.config.

Run your app with the MONO_LOG_LEVEL environment variable set to "info"
and the MONO_LOG_MASK environment variable set to "dll", e.g.

	MONO_LOG_LEVEL=info MONO_LOG_MASK=dll mono --debug program.exe

The output will contain many diagnostic messages specifying what
libraries it's trying to load, and what errors (if any) mono is
encountering when trying to load the library.

 - Jon

More information about the Mono-list mailing list