[Mono-bugs] [Bug 80866][Wis] New - Application.Startuppath fails

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Feb 15 16:01:32 EST 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by azraill at gmail.com.


--- shadow/80866	2007-02-15 16:01:32.000000000 -0500
+++ shadow/80866.tmp.10301	2007-02-15 16:01:32.000000000 -0500
@@ -0,0 +1,50 @@
+Bug#: 80866
+Product: Mono: Class Libraries
+Version: 1.2
+OS: GNU/Linux [Other]
+OS Details: Debian Sarge
+Status: NEW   
+Priority: Wishlist
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: azraill at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Application.Startuppath fails
+Description of Problem:
+When ran in a non-root application domain, a call to 
+System.Windows.Forms.Application.Startuppath fails, i.e. it returns 
+Code to reproduce the problem:
+Public Class ParentObject
+    Inherits MarshalByRefObject
+    Public Shared Sub main()
+        Dim domainsetup As New AppDomainSetup
+        domainsetup.ShadowCopyFiles = "true"
+        Dim plugindomain As AppDomain = AppDomain.CreateDomain("BugTest", 
+Nothing, domainsetup)
+        Dim assldr As RemotingObject = 
+ GetType(RemotingObject).FullName), RemotingObject)
+        Console.WriteLine((assldr.ApplicationRoot).ToString) 'this line 
+throws the null-ref exception. 
+        Console.Read()
+    End Sub
+End Class
+Public Class RemotingObject
+    Inherits MarshalByRefObject
+    Public Function ApplicationRoot() As String
+        Return System.Windows.Forms.Application.StartupPath
+    End Function
+    Public Function ProcessName() As String
+        Return System.Diagnostics.Process.GetCurrentProcess.ProcessName
+    End Function
+End Class

More information about the mono-bugs mailing list