[Mono-dev] Problem with google calendar authentication using embedded mono in app

Robert Jordan robertj at gmx.net
Tue Mar 24 12:55:12 EDT 2009


Chenthill wrote:
> On Mon, 2009-03-23 at 21:15 +0100, Robert Jordan wrote:
>> Chenthill wrote:
>>> I updated to the last mono builds using monocharge and still see the problem.
>>> Am loading the assembly from a library. So am not using mono_jit_exec..
>> You must use mono_jit_exec. Otherwise the runtime does not have
>> sane defaults for the main assembly, which leads to errors whenever 
>> Assembly.GetExecutingAssembly() is invoked.
>> Just add this code to the aforementioned assembly:
>> internal class EntryPoint {static void Main () {} }
>> and call mono_jit_exec on it before starting to use it. The assembly
>> does not need to be an .exe.
> I tried adding the EntryPoint class and compiling the assembly as a
> library, but it did not work. I get the following error,
> 'Assembly 'sample.dll' doesn't have an entry point.'
> Attaching the test programs which I used. Please change the hard coded
> paths.
> But compiling it as a executable seems to work fine!! I have changed my
> code to have it as a workaround. Am really happy to get it working and
> thanks a lot for your help :)

Oops! Yes, the assembly must be compiled with /target:exe, otherwise
the entry point won't be defined.


More information about the Mono-devel-list mailing list