-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle more Attribute Types when Filtering Assemblies
Fixes #9369 When System.Reflection.Metadata comes across an Attribute which has a generic, it does NOT return a `TypeReferenceHandle`. It returns a `TypeSpecificationHandle`. Tying to cast the type results in the following error ``` System.InvalidCastException: Die angegebene Umwandlung ist ungültig. error XAFLT7007: bei System.Reflection.Throw.InvalidCast() error XAFLT7007: bei System.Reflection.Metadata.TypeReferenceHandle.op_Explicit(EntityHandle handle) error XAFLT7007: bei Xamarin.Android.Tasks.MetadataExtensions.GetCustomAttributeFullName(MetadataReader reader, CustomAttribute attribute) error XAFLT7007: bei Xamarin.Android.Tasks.FilterAssemblies.IsAndroidAssembly(AssemblyDefinition assembly, MetadataReader reader) error XAFLT7007: bei Xamarin.Android.Tasks.FilterAssemblies.ProcessAssembly(ITaskItem assemblyItem, List`1 output) error XAFLT7007: bei Xamarin.Android.Tasks.FilterAssemblies.RunTask() error XAFLT7007: bei Microsoft.Android.Build.Tasks.AndroidTask.Execute() ``` So we need to handle this case, and put in place a backup to handle an `InvalidCastException` so that we never hit this issue again.
- Loading branch information
1 parent
4e4bc08
commit 3be2474
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters