[Mono-bugs] [Bug 668171] New: Unable to set MonoAppDomain when embedding mono into applications.
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Jan 29 18:28:32 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=668171
https://bugzilla.novell.com/show_bug.cgi?id=668171#c0
Summary: Unable to set MonoAppDomain when embedding mono into
applications.
Classification: Mono
Product: Mono: Runtime
Version: 2.10.x
Platform: x86
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: ToXedVirus at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: DeveloperNet
Blocker: No
Created an attachment (id=411139)
--> (http://bugzilla.novell.com/attachment.cgi?id=411139)
case example of bug
When embedding mono into an application and handing over the control
to the managed code with mono_runtime_invoke, the application_base of the
domain setup is not being set. mono_runtime_exec_main on the other site
sets it correctly.
If the application_base is not set correctly,
AppDomain.CurrentDomain.BaseDirectory returns null.
It is possible to avoid the problem by running mono_runtime_exec_main on an
empty function, but it is clearly a lack of public api or functionality.
In my case I used NHibernate in an embedded mono app and somewhere deep down
in the code AppDomain.CurrentDomain.BaseDirectory was called and its value was
used in Path.Combine. Since it returned null, an exception was thrown.
Look at the attached file, it contains case scenario of the described problem.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list