Esempio n. 1
0
        /// <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);
        }
Esempio n. 2
0
        /// <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);
        }