[Mono-dev] Problem when embedding dll (without Main method)

Robert Jordan robertj at gmx.net
Mon Oct 12 08:07:14 EDT 2009

holgers wrote:
> Hello,
> when embedding a dll which has no main method I encountered the following
> problem:
> I cannot invoke mono_jit_exec(...) because there is no main. This results in
> a not completely initialized runtime.
> Is there another way to initialize the runtime correctly?

There is no other way, but it's sufficient to perform mono_jit_exec
or mono_jit_init followed by mono_runtime_exec_main on an *arbitrary*
assembly. This assembly could be as simple as this:

class Program { static void Main () {} }


More information about the Mono-devel-list mailing list