[Mono-list] mono_jit_exec problem

Fede federico.omoto at gmail.com
Sat Nov 13 19:23:23 EST 2010


Thank you very much for your answer!
I tried setting the MONO_PATH environment variable to where the assemblies
are located and the mono command line program seems to do the same, it
doesn't run the main assembly.

The debug output shows that all referenced assemblies are loaded OK:

Is there something else I could try?

Thank you in advance,

Federico Omoto

On Sat, Nov 13, 2010 at 3:25 PM, Robert Jordan <robertj at gmx.net> wrote:

> On 13.11.2010 18:10, Fede wrote:
> > That is for example: if I call it with "path/to/myassembly.exe" or
> > "/full/path/to/myassembly.exe", mono_jit_exec() just returns without
> > executing the program; in the other hand, if I call it being in the same
> > directory where the assembly is located the program just runs fine.
> >
> > I've also tried using the mono command line program to see what happens
> in
> > this situation and verified the same behaviour, so I assume it's not my
> code
> > fault.
> This is not a bug. It's by design. Even an embedded Mono is bound
> to the .NET assembly binding rules.
> > Do I have to do something to run an assembly that is not located in the
> same
> > path of my application?
> Yes. There are plenty of options for changing the binding rules:
> - reconsider changing the rules because they make sense
> - MONO_PATH (see Mono's man page)
> - App.config's <assemblyBinding> (see MSDN)
> - assembly load hooks (see include/mono-x.x/metadata/assembly.h,
>   mono_install_assembly_preload_hook and friends).
> Robert
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20101113/2b367c45/attachment.html 

More information about the Mono-list mailing list