Paket does not use global nuget cache directory set in configuration file
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
Using nuget config it's possible to select an alternative nuget cache location: https://docs.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior
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 returne:\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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Paket restore entry point and trace how NuGet configuration is read, comparing globalPackagesFolder with the NUGET_PACKAGES workaround. Reproduce the issue with the provided nuget config and paket restore steps; done means packages are downloaded to the configured e:\nuget\packages path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100