[Mono-dev] Problem with google calendar authentication using embedded mono in app
Chenthill
pchen at gnome.org
Tue Mar 24 12:50:04 EDT 2009
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 :)
thanks, Chenthill.
>
> Robert
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mono-load.c
Type: text/x-csrc
Size: 1562 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090324/8378347a/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.cs
Type: text/x-csharp
Size: 1226 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090324/8378347a/attachment-0001.bin
More information about the Mono-devel-list
mailing list