Browse Source

Fix #1208: v4.x: EnumUnderlyingTypeResolveException when opening up assembly

pull/1213/head
Siegfried Pammer 7 years ago
parent
commit
18e0c7110f
  1. 7
      ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs

7
ICSharpCode.Decompiler/TypeSystem/Implementation/AttributeListBuilder.cs

@ -27,6 +27,7 @@ using ICSharpCode.Decompiler.Util; @@ -27,6 +27,7 @@ using ICSharpCode.Decompiler.Util;
using ICSharpCode.Decompiler.Semantics;
using System.Runtime.InteropServices;
using System.Linq;
using ICSharpCode.Decompiler.Metadata;
namespace ICSharpCode.Decompiler.TypeSystem.Implementation
{
@ -217,7 +218,11 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation @@ -217,7 +218,11 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
foreach (var secDecl in securityDeclarations) {
if (secDecl.IsNil)
continue;
AddSecurityAttributes(metadata.GetDeclarativeSecurityAttribute(secDecl));
try {
AddSecurityAttributes(metadata.GetDeclarativeSecurityAttribute(secDecl));
} catch (EnumUnderlyingTypeResolveException) {
// ignore resolve errors
}
}
}

Loading…
Cancel
Save