You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above works on desktop mono and dotnet run, but fails with the .NET 5 monovm, along the lines of this gist:
System.ArgumentException: Type passed in must be derived from System.Attribute or System.Attribute itself. INameable
at System.Reflection.CustomAttribute.GetCustomAttributes(ICustomAttributeProvider obj, Type attributeType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
The text was updated successfully, but these errors were encountered:
I'd hoped to simplify the type checking, but I broke this in the process. With that said, I think this is only a problem for interfaces, so I should be able to special-case those and move along without undoing my changes? I'll also add a test to libraries so we don't regress on this again.
Context: #7190
Context: https://gist.github.com/pjcollins/a3cdf82a6e04cfafbb0ea613b769a8bb
Context: https://github.com/xamarin/java.interop/blob/bd7c60a6a5ea8abaf6f241da17c42d2d93226bf2/src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings/JavaNativeTypeManager.cs#L291
Context: https://github.com/xamarin/xamarin-android/tree/test-net5-drop
The attempt to run Xamarin.Android atop monovm has run into a compatibility issue around
Type.GetCustomAttributes()
and interfaces.Consider the following code (philosophically similar to Issue #7190 but without external dependencies):
The above works on desktop mono and
dotnet run
, but fails with the .NET 5 monovm, along the lines of this gist:The text was updated successfully, but these errors were encountered: