Browse Source

Fix #3090: add support for the NUGET_PACKAGES environment variable

pull/3111/head
Siegfried Pammer 2 years ago
parent
commit
26c9df5d03
  1. 5
      ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs

5
ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs

@ -60,6 +60,7 @@ namespace ICSharpCode.Decompiler.Metadata @@ -60,6 +60,7 @@ namespace ICSharpCode.Decompiler.Metadata
}
static readonly string[] LookupPaths = new string[] {
Environment.GetEnvironmentVariable("NUGET_PACKAGES"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages")
};
@ -109,6 +110,10 @@ namespace ICSharpCode.Decompiler.Metadata @@ -109,6 +110,10 @@ namespace ICSharpCode.Decompiler.Metadata
foreach (var path in LookupPaths)
{
if (string.IsNullOrWhiteSpace(path))
{
continue;
}
foreach (var p in packages)
{
foreach (var item in p.RuntimeComponents)

Loading…
Cancel
Save