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?