[Mono-bugs] [Bug 79181][Nor] Changed - Assembly.CodeBase does not return the expected result

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Aug 26 19:54:26 EDT 2006


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 robertj at gmx.net.

http://bugzilla.ximian.com/show_bug.cgi?id=79181

--- shadow/79181	2006-08-26 18:41:44.000000000 -0400
+++ shadow/79181.tmp.11068	2006-08-26 19:54:26.000000000 -0400
@@ -1,13 +1,13 @@
 Bug#: 79181
 Product: Mono: Class Libraries
 Version: unspecified
 OS: GNU/Linux [Other]
 OS Details: Ubuntu 6.06 (dapper)
-Status: NEW   
-Resolution: 
+Status: RESOLVED   
+Resolution: NOTABUG
 Severity: 001 One hour
 Priority: Normal
 Component: CORLIB
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: dna at informatik.uni-kiel.de               
 QAContact: mono-bugs at ximian.com
@@ -45,6 +45,29 @@
 Found some more informations here:
 http://lists.ximian.com/pipermail/mono-list/2004-June/021044.html
 
 
 Or is there another solution for getting the application directory,
 that works on .net and mono ?
+
+------- Additional Comments From robertj at gmx.net  2006-08-26 19:54 -------
+> Maybe this is not a bug, but then you need extra code to identify   
+> the operationsystem. And this is not a good solution.
+
+You don't need extra code.
+
+
+using System;
+using System.IO;
+using System.Reflection;
+
+class T
+{
+        static void Main ()
+        {
+                Console.WriteLine (Path.GetDirectoryName(new Uri
+(Assembly.GetExecutingAssembly().CodeBase).LocalPath));
+                Console.WriteLine
+(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
+        }
+}
+


More information about the mono-bugs mailing list