Skip to content

Commit

Permalink
Fix #3090: add support for the NUGET_PACKAGES environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Oct 17, 2023
1 parent d7168ae commit 26c9df5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ICSharpCode.Decompiler/Metadata/DotNetCorePathFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public DotNetCorePackageInfo(string fullName, string type, string path, string[]
}

static readonly string[] LookupPaths = new string[] {
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages")
Environment.GetEnvironmentVariable("NUGET_PACKAGES"),
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages")
};

static readonly string[] RuntimePacks = new[] {
Expand Down Expand Up @@ -109,6 +110,10 @@ public DotNetCorePathFinder(string parentAssemblyFileName, string targetFramewor

foreach (var path in LookupPaths)
{
if (string.IsNullOrWhiteSpace(path))
{
continue;
}
foreach (var p in packages)
{
foreach (var item in p.RuntimeComponents)
Expand Down

0 comments on commit 26c9df5

Please sign in to comment.