From 0ce7d65659916035f22e7648371b63cdbbc39bf1 Mon Sep 17 00:00:00 2001 From: David Wrighton Date: Wed, 4 Aug 2021 16:34:51 -0700 Subject: [PATCH] Remove depenency on MemberRef Parent of a custom attribute constructor being a TypeReference --- src/Tasks/AssemblyDependency/AssemblyInformation.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Tasks/AssemblyDependency/AssemblyInformation.cs b/src/Tasks/AssemblyDependency/AssemblyInformation.cs index 4af1396f59e..9a6e36c008e 100644 --- a/src/Tasks/AssemblyDependency/AssemblyInformation.cs +++ b/src/Tasks/AssemblyDependency/AssemblyInformation.cs @@ -405,6 +405,11 @@ private void CorePopulateMetadata() } var container = metadataReader.GetMemberReference((MemberReferenceHandle) ctorHandle).Parent; + if (container.Kind != HandleKind.TypeReference) + { + continue; + } + var name = metadataReader.GetTypeReference((TypeReferenceHandle) container).Name; if (!string.Equals(metadataReader.GetString(name), "TargetFrameworkAttribute")) {