The library test fails. ``` [FAIL] System.Reflection.Context.Tests.CustomReflectionContextTests.MapType_MemberAttributes_Success Assert.IsType() Failure Expected: System.Reflection.Context.Tests.TestAttribute Actual: System.Runtime.Serialization.OnSerializedAttribute at System.Reflection.Context.Tests.CustomReflectionContextTests.MapType_MemberAttributes_Success() + 0x8b at System.Reflection.Context.Tests!<BaseAddress>+0x3f9edc at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0xf1 [FAIL] System.Reflection.Context.Tests.CustomReflectionContextTests.MapType_ParameterAttributes_Success Assert.IsType() Failure Expected: System.Reflection.Context.Tests.TestAttribute Actual: System.Reflection.Context.Tests.TestParameterAttribute at System.Reflection.Context.Tests.CustomReflectionContextTests.MapType_ParameterAttributes_Success() + 0xf2 at System.Reflection.Context.Tests!<BaseAddress>+0x3f9edc at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0xf1 ```
Activity
jkotas commentedon Aug 4, 2022
This is caused by subtle behavior differences in CoreCLR vs. NativeAOT reflection.
It should be fixed by deleting https://github.com/dotnet/runtime/blob/main/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Reflection/Attribute.NativeAot.cs, replacing it with https://github.com/dotnet/runtime/blob/main/src/coreclr/System.Private.CoreLib/src/System/Attribute.CoreCLR.cs, and tying up loose ends.
Disable `CustomReflectionContextExamples.AddCustomAttribute` on Nativ…
Disable `CustomReflectionContextExamples.AddCustomAttribute` on Nativ…
Disable `CustomReflectionContextExamples.AddCustomAttribute` on Nativ…
Share Attribute implementation with NativeAOT (#132821)