Make the FNF exception light up more robust

上级 b9a29861
...@@ -14,12 +14,11 @@ internal static class DesktopShim ...@@ -14,12 +14,11 @@ internal static class DesktopShim
{ {
internal static class FileNotFoundException internal static class FileNotFoundException
{ {
internal static readonly Type Type = ReflectionUtilities.TryGetType( internal static readonly Type Type = typeof(FileNotFoundException);
"System.IO.FileNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
private static PropertyInfo s_fusionLog = Type?.GetTypeInfo().GetDeclaredProperty("FusionLog"); private static PropertyInfo s_fusionLog = Type?.GetTypeInfo().GetDeclaredProperty("FusionLog");
internal static string TryGetFusionLog(object obj) => s_fusionLog.GetValue(obj) as string; internal static string TryGetFusionLog(object obj) => s_fusionLog?.GetValue(obj) as string;
} }
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册