From e812a1f2309c45b7906abbf89cde79c3f2b2296d Mon Sep 17 00:00:00 2001 From: Chris Poole Date: Thu, 20 Dec 2018 14:28:48 +0000 Subject: [PATCH] Add search path for Compact Framework 3.5 mscorlib.dll --- .../Metadata/UniversalAssemblyResolver.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs b/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs index 0040d7808..6256d62de 100644 --- a/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs +++ b/ICSharpCode.Decompiler/Metadata/UniversalAssemblyResolver.cs @@ -405,6 +405,17 @@ namespace ICSharpCode.Decompiler.Metadata } } + if (version.Major == 3 && version.Minor == 5) { + string cfBasePath = Path.Combine((Environment.Is64BitOperatingSystem ? + Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) : + Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)), + @"Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\"); + + if (Directory.Exists(cfBasePath)) { + return cfBasePath; + } + } + if (throwOnError) throw new NotSupportedException("Version not supported: " + version); return null;