[Mono-bugs] [Bug 59665][Nor] New - Type.GUID is never initialized
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sun, 6 Jun 2004 13:55:13 -0400 (EDT)
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 gert.driesen@pandora.be.
http://bugzilla.ximian.com/show_bug.cgi?id=59665
--- shadow/59665 2004-06-06 13:55:13.000000000 -0400
+++ shadow/59665.tmp.29524 2004-06-06 13:55:13.000000000 -0400
@@ -0,0 +1,57 @@
+Bug#: 59665
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gert.driesen@pandora.be
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Type.GUID is never initialized
+
+The Mono runtime never generates the GUID of a Type.
+
+Even, when a GUID is explicitly assigned to a given type using the
+GuidAttribute, the Mono runtime ignores the value that was set at compile
+time.
+
+You reproduce this issue using this :
+
+using System;
+using System.Runtime.InteropServices;
+
+public class EntryPoint
+{
+ public static void Main ()
+ {
+ Type type = typeof(string);
+ Console.WriteLine(type.FullName + " GUID: " + type.GUID);
+
+ type = typeof(FixedGuidClass);
+ Console.WriteLine(type.FullName + " GUID: " + type.GUID);
+ }
+}
+
+[GuidAttribute("296afbff-1b0b-3ff5-9d6c-4e7e599f8b58")]
+public class FixedGuidClass {
+}
+
+On MS.NET this results in the following output :
+
+System.String GUID: 296afbff-1b0b-3ff5-9d6c-4e7e599f8b57
+FixedGuidClass GUID: 296afbff-1b0b-3ff5-9d6c-4e7e599f8b58
+
+On Mono, you get the following output :
+
+System.String GUID: 00000000-0000-0000-0000-000000000000
+FixedGuidClass GUID: 00000000-0000-0000-0000-000000000000
+
+I assume the GUID should be generated in
+mono_reflection_create_runtime_class in reflection.c