diff --git a/src/CSnakes.Runtime/Locators/NuGetLocator.cs b/src/CSnakes.Runtime/Locators/NuGetLocator.cs index b1d30a98..b178c50a 100644 --- a/src/CSnakes.Runtime/Locators/NuGetLocator.cs +++ b/src/CSnakes.Runtime/Locators/NuGetLocator.cs @@ -11,9 +11,9 @@ public override PythonLocationMetadata LocatePython() { throw new DirectoryNotFoundException("Neither NUGET_PACKAGES or USERPROFILE environments variable were found, which are needed to locate the NuGet package cache."); } - string? globalNugetPackagesPath = string.IsNullOrEmpty(nugetPackagesOverride) ? userProfile : nugetPackagesOverride; + string? globalNugetPackagesPath = string.IsNullOrEmpty(nugetPackagesOverride) ? Path.Combine(userProfile, ".nuget", "packages") : nugetPackagesOverride; // TODO : Load optional path from nuget settings. https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders - string nugetPath = Path.Combine(globalNugetPackagesPath!, ".nuget", "packages", "python", $"{Version.Major}.{Version.Minor}.{Version.Build}", "tools"); + string nugetPath = Path.Combine(globalNugetPackagesPath!, "python", $"{Version.Major}.{Version.Minor}.{Version.Build}", "tools"); return LocatePythonInternal(nugetPath); }