Browse Source

Fix #1004: Crashed when ref to mscorlib, Version=65535.65535.65535.65535, Culture=neutral, PublicKeyToken=b77a5c561934e089

pull/1278/head
Siegfried Pammer 8 years ago
parent
commit
90f0f7199d
  1. 11
      ICSharpCode.Decompiler/DotNetCore/UniversalAssemblyResolver.cs

11
ICSharpCode.Decompiler/DotNetCore/UniversalAssemblyResolver.cs

@ -211,8 +211,11 @@ namespace ICSharpCode.Decompiler
path = Path.Combine(path, "2.0"); path = Path.Combine(path, "2.0");
} else if (version.Major == 4) } else if (version.Major == 4)
path = Path.Combine(path, "4.0"); path = Path.Combine(path, "4.0");
else else {
throw new NotSupportedException("Version not supported: " + version); if (throwOnError)
throw new NotSupportedException("Version not supported: " + version);
return null;
}
} else { } else {
switch (version.Major) { switch (version.Major) {
case 1: case 1:
@ -228,7 +231,9 @@ namespace ICSharpCode.Decompiler
path = Path.Combine(path, "v4.0.30319"); path = Path.Combine(path, "v4.0.30319");
break; break;
default: default:
throw new NotSupportedException("Version not supported: " + version); if (throwOnError)
throw new NotSupportedException("Version not supported: " + version);
return null;
} }
} }

Loading…
Cancel
Save