Get types from UnityEngine.dll failed on RequireComponent

Any access to type RequireComponent in UnityEngine.dll will fail. For example: typeof(UnityEngine.UnityEngine.dll)

Reflecting will also fail due to it:

Console.WriteLine(typeof(UnityEngine.Animation).Name);

Assembly a = typeof(UnityEngine.Animation).Assembly;

Type tps = a.GetExportedTypes();

The last line will throw an exception saying that type RequireComponent is not in a valid format.

I compiled the code both in SharpDevelop and in XBuild in the Unity Mono folder (C:\Program Files (x86)\Unity\Editor\Data\Mono\bin). Both give the same result.

Is it a bug? If RequireComponent is not supposed to be used then it should be made private so that Assembly.GetExportedTypes() should not try to load it.

Any ways to get around it to get all public types in UnityEngine.Dll?

RequireComponent is supposed to be used (it's a public attribute which is pretty useful).

The unity 3 assembly has some protection against things in it being called by reflection, so I'm wondering if it's just hitting that