提交 40b34f30 编写于 作者: J Jared Parsons

Fix the assembly resolution

上级 9382f888
......@@ -28,7 +28,15 @@ public static void Install()
internal static Assembly ResolveAssembly(string assemblyDisplayName, Assembly requestingAssemblyOpt)
{
var name = new AssemblyName(assemblyDisplayName);
return TryRedirect(name) ? Assembly.Load(name) : null;
try
{
return TryRedirect(name) ? Assembly.Load(name) : null;
}
catch
{
ValidateBootstrapUtil.AddFailedLoad(name);
throw;
}
}
private static readonly byte[] s_b03f5f7f11d50a3a = new byte[] { 0xb0, 0x3f, 0x5f, 0x7f, 0x11, 0xd5, 0x0a, 0x3a };
......@@ -44,6 +52,7 @@ private static bool TryRedirect(AssemblyName name)
case "System.Console":
case "System.Diagnostics.FileVersionInfo":
case "System.IO.Pipes":
case "System.Security.AccessControl":
case "System.Security.Cryptography.Primitives":
case "System.Security.Principal.Windows":
case "System.Threading.Thread":
......@@ -55,13 +64,10 @@ private static bool TryRedirect(AssemblyName name)
case "System.Diagnostics.Process":
case "System.Diagnostics.StackTrace":
case "System.Security.AccessControl":
return TryRedirect(name, s_b03f5f7f11d50a3a, 4, 0, 3, 0);
}
ValidateBootstrapUtil.AddFailedLoad(name);
return false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册