/// <summary> /// Assemblies in "C:\Program Files\Reference Assemblies\" doesn't have implementation. /// Try to get the assembly from GAC /// See https://github.com/vchirikov/GoToDnSpy/issues/2 /// </summary> private static string TryCorrectReferenceAssemblyPath(string path, string assemblyDef) { if (!GacHelper.IsReferenceAssembly(path)) { return(path); } var netfxGacPath = GacHelper.FindAssemblyInGac(assemblyDef); return(netfxGacPath ?? path); }
/// <summary> /// Assemblies in "C:\Program Files\Reference Assemblies\" doesn't have implementation. /// Try to get the assembly from GAC /// See https://github.com/verysimplenick/GoToDnSpy/issues/2 /// </summary> private static string TryCorrectReferenceAssemblyPath(string path, string assemblyDef) { if (!GacHelper.IsReferenceAssembly(path)) { return(path); } var assemblyName = new AssemblyName(assemblyDef); var filepath = GacHelper.FindAssemblyInGac(assemblyName); return(filepath ?? path); }