[Mono-list] DllNotFoundException on Mono Windows
P T Rajkumar
ptrajkumar at gmail.com
Wed Dec 9 07:31:21 EST 2009
There is a huge section on this on the mono website. Basically
something about the app path and mono path being different.
Maybe you are running into it ?
-raj
On Dec 9, 2009, at 6:52 AM, Damien <maitredede at gmail.com> wrote:
> Hi,
>
> I have a DllImportException when I try to call a DllImport function,
> from a dll that is not in current program path but in environement
> path that I have set a few lines of code above the call...
>
> I'm using :
> Mono version 2.4.3
> Windows 7 Ultimate x86
>
> I alter the Environement path this way :
> --8<----8<----8<----8<----8<--
> string current = Environment.GetEnvironmentVariable("path",
> EnvironmentVariableTarget.Process);
> current += ";" + newpath;
> Environment.SetEnvironmentVariable("path", current,
> EnvironmentVariableTarget.Process);
> --8<----8<----8<----8<----8<--
>
> Then I have a call to my dll, but I have a DllNotFoundException.
>
> It seems that Mono does not take in account the modified path when
> searching the dll.
>
> Does someone have idea if it is a bug or a simple mistake from me ?
>
> It works well using microsoft framework.
>
> Thanks.
>
> Damien
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
More information about the Mono-list
mailing list