[Mono-list] DDllImport .config file does not work
abramesd at kmbs.konicaminolta.us
Wed Sep 20 10:25:21 EDT 2006
Sorry I pressed send before I had finish my e-mail...
Thank you for your reply. I ran my program as you suggested and the output
I am getting shows how mono is trying to find the shared object by mangling
the original library name. For example it adds '.so' to the end and 'lib'
to the beginning and then tries about a dozen various combinations of this.
However none of these match the actual shared object name.
I removed the MONO_LOG_MASK=dll from your suggestion and the display shows
that mono is looking for the .config file in the correct location but does
not appear to find it as it also looks for it in '/etc/mono/assemblies/' and
'/home/david/.mono/assemblies/'. I copied my .config file to the other
locations using the same name that mono appears to be looking for and it
still does not appear to find the .config file.
Do you have any other suggestions or ideas?
> -----Original Message-----
> From: Jonathan Pryor [mailto:jonpryor at vt.edu]
> Sent: Tuesday, September 19, 2006 9:34 PM
> To: abramesd at kmbs.konicaminolta.us
> Cc: mono-list at lists.ximian.com
> Subject: Re: [Mono-list] DDllImport .config file does not work
> 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