You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Paket does not use global nuget cache directory set in configuration file #3853
However, Paket does not properly use the configured value, causing some strange and confusing error messages, for example:
Package C:\src\project\packages\Microsoft.AspNet.Razor\microsoft.aspnet.razor.4.0.0-beta7.nupkg couldn't be extracted to "C:\src\project\packages\Microsoft.AspNet.Razor". System.IO.InvalidDataException: End of Central Directory record could not be found.. Trying to extract files individually.
Repro steps
Set an alternate cache directory: nuget config -set globalPackagesFolder=e:\nuget\packages
Verify the configuration: nuget config globalPackagesFolder, should return e:\nuget\packages
Use paket restore
Expected behavior
Downloaded packages should be put in e:\nuget\packages
Actual behavior
Downloaded packages end up in C:\Users\user\.nuget\packages
Known workarounds
Setting the environment variable set NUGET_PACKAGES=e:\nuget\packages works.
==> Trying again
Downloading Microsoft.AspNet.Razor 4.0.0-beta7
Not moving as 'C:\Users\user\.nuget\packages\microsoft.aspnet.razor\4.0.0-beta7\microsoft.aspnet.razor.4.0.0-beta7.nupkg' already exists (maybe some other instance downloaded it as well)
Download of Microsoft.AspNet.Razor 4.0.0-beta7 done in 3 seconds. (878 kbit/s, 0 MB)
Package C:\src\project\packages\Microsoft.AspNet.Razor\microsoft.aspnet.razor.4.0.0-beta7.nupkg couldn't be extracted to "C:\src\project\packages\Microsoft.AspNet.Razor". System.IO.InvalidDataException: End of Central Directory record could not be found.. Trying to extract files individually.
Something went wrong while downloading Microsoft.AspNet.Razor 4.0.0-beta7
Message: Error during extraction of C:\src\project\packages\Microsoft.AspNet.Razor\microsoft.aspnet.razor.4.0.0-beta7.nupkg.
This has already been fixed by commit 3e84a7742 ("Use NuGet.Configuration to get the path to the NuGet global packages folder"), which explicitly references this issue. Paket's Constants.UserNuGetPackagesFolder now resolves via NuGet.Configuration.SettingsUtility.GetGlobalPackagesFolder, which respects globalPackagesFolder set via nuget.config, matching the expected behavior described here.
Recommend closing this issue as fixed. Please reopen if the behavior still reproduces on a recent Paket release.
Generated by 🌈 Repo Assist, see workflow run. Learn more. Comment /repo-assist to run again
Add this agentic workflow to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38
Activity
audun commentedon May 25, 2020
A bit more complete error log:
[Testing] Use NuGet.Configuration to get the path to the NuGet global…
Use NuGet.Configuration to get the path to the NuGet global packages …
Use NuGet.Configuration to get the path to the NuGet global packages …
github-actions commentedon Sep 1, 2026
🤖 This is an automated response from Repo Assist.
This has already been fixed by commit 3e84a7742 ("Use NuGet.Configuration to get the path to the NuGet global packages folder"), which explicitly references this issue. Paket's
Constants.UserNuGetPackagesFoldernow resolves viaNuGet.Configuration.SettingsUtility.GetGlobalPackagesFolder, which respectsglobalPackagesFolderset vianuget.config, matching the expected behavior described here.Recommend closing this issue as fixed. Please reopen if the behavior still reproduces on a recent Paket release.
Add this agentic workflow to your repo
To install this agentic workflow, run