[Mono-dev] Assembly.GetEntryAssembly() returns null

Janne Rantala janne.rantala at gmail.com
Fri Jul 28 08:25:44 EDT 2006


2006/7/27, Miguel de Icaza <miguel at ximian.com>:
>
> Hello,
>
> > I've loaded assembly (compiled in VS.NET) in embedded environment.
> > This assembly is supposed to work as a client for web service. However
> > this does not work because Assembly.GetEntryAssembly returns null when
> > called from managed code. This causes ConfigurationManager to throw
> > ArgumentException stating that "exePath must be specified when not
> > running inside a stand alone exe".
>
> It sounds like you might be missing some call to initialize the embedded
> runtime.  I have seen that in the past, but I do not remember what it
> was
>

Hi,

That was it. I wrote in my previous post that I had to to
mono_runtime_exec_main call also because entry assembly is only set there. I
thought that this call was needed for calling Main -method only.

It would be nice to be able to just create objects without having to call
Main method as well.

Janne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060728/91f541bf/attachment.html 


More information about the Mono-devel-list mailing list