diff --git a/ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs b/ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs index 91937943b..42c32c4ef 100644 --- a/ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs +++ b/ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs @@ -135,6 +135,8 @@ namespace ICSharpCode.Decompiler.Metadata return null; var basePaths = RuntimePacks.Select(pack => Path.Combine(dotnetBasePath, "shared", pack)); foreach (var basePath in basePaths) { + if (!Directory.Exists(basePath)) + continue; var closestVersion = GetClosestVersionFolder(basePath, version); if (File.Exists(Path.Combine(basePath, closestVersion, name.Name + ".dll"))) { return Path.Combine(basePath, closestVersion, name.Name + ".dll");