diff --git a/src/Compilers/Shared/DesktopShim.cs b/src/Compilers/Shared/DesktopShim.cs index 1281b5194f68c42c45387a77b10fc6d33e229f59..ebdb3367239bcc0481d61ae255ac2103bf76eb8e 100644 --- a/src/Compilers/Shared/DesktopShim.cs +++ b/src/Compilers/Shared/DesktopShim.cs @@ -14,12 +14,11 @@ internal static class DesktopShim { internal static class FileNotFoundException { - internal static readonly Type Type = ReflectionUtilities.TryGetType( - "System.IO.FileNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); + internal static readonly Type Type = typeof(FileNotFoundException); 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; } } }