[Mono-dev] Embedding w/ Config Errors | No Entry Assembly
met at uberstats.com
Sat Sep 5 14:30:00 EDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
As some might have picked up I'm embedding Mono into a project and all
is mostly going well. While trying to tie together .NET objects with
GObject's via compiled MonoMethod thunks I hit a snag.
System.TypeInitializationException: An exception was thrown by the type
initializer for System.Xml.Serialization.XmlSerializer --->
System.Configuration.ConfigurationErrorsException: Error Initializing
the configuration system. ---> System.NullReferenceException: Object
reference not set to an instance of an object
After digging through a bit it looks like the static .ctor of
XmlSerializer calls ConfigurationSettings.GetConfig which triggers a
chain of methods getting called to find the configuration for the
Sadly the entry assembly is NULL so the whole system goes BOOM! Mono is
embedded so that I can instantiate classes and then some methods from C.
As there is no EXE how can I properly LIE to the framework so it'll
believe there is one?
Finally, I'm initializing the runtime like so:
domain = mono_jit_init_version("Blox", "v2.0.50727");
And then calling mono_domain_assembly_open(domain, "Other.dll")
each time I load a new DLL.
I've tried mono_jit_init("../to/some/actual/dll") and that failed too.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the Mono-devel-list