[Mono-bugs] [Bug 60439][Nor] Changed - mcs does not emit assembly qualified type name for types used in attributes

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 19 Jun 2004 11:18:29 -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 sebastien@ximian.com.

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

--- shadow/60439	2004-06-19 11:15:23.000000000 -0400
+++ shadow/60439.tmp.16458	2004-06-19 11:18:29.000000000 -0400
@@ -66,6 +66,27 @@
 As you can see, Mono is trying to load the type with a null 
 publickeytoken, as this is what's emitted by mcs.
 
 ------- Additional Comments From sebastien@ximian.com  2004-06-19 11:15 -------
 Confirmed as a compiler/runtime issue as the same code assembly
 (compiled by mcs) doesn't work on the MS runtime either.
+
+------- Additional Comments From sebastien@ximian.com  2004-06-19 11:18 -------
+There's also no problem when we are only referencing corlib. So the
+following code returns 1 on both Mono and MS runtime (compiled by MCS).
+
+using System;
+using System.Reflection;
+
+public class EntryPoint
+{
+        public static void Main ()
+        {
+                Type type = typeof(TestClass);
+                object[] attributes = type.GetCustomAttributes (false);
+                Console.WriteLine (attributes.Length);
+        }
+}
+
+[AttributeUsage (AttributeTargets.All)]
+public class TestClass {
+}