fsprojects / fsprojects/Paket

Paket does not use global nuget cache directory set in environment variable

Open
#4,209 0 comments 1 reaction 0 assignees View on GitHub

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 with the environment variable NUGET_PACKAGES, see global packages at https://learn.microsoft.com/en-us/nuget/consume-packages/managing-the-global-packages-and-cache-folders.

Repro steps

Useing Paket version 7.2.0+bb14ab674b2748070a624f394cd6796e11aaffa8

Please provide the steps required to reproduce the problem

  1. Clear current NuGet caches dotnet nuget locals all --clear

  2. Move Nuget Cache to another drive, e.g. set NUGET_PACKAGESto E:\nuget in the Windows system environment variables.

  3. Restore a solution using Paket

  4. Build will fail, in the folder %USERPROFILE%\AppData\Local\NuGet\Cache\ projects are restored and not all files are in the corresponding subfolders, the environment variable is not respected

If possible then please create a git repository with a repro sample or attach a zip to the issue.

May be releated with https://github.com/fsprojects/Paket/issues/3853

Expected behavior

Please provide a description of the behavior you expect.

Actual behavior

Please provide a description of the actual behavior you observe.

Known workarounds

Don't use the environment variable :(, replace the directory %USERPROFILE%\AppData\Local\NuGet with a link to another drive.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the restore with NUGET_PACKAGES set to an alternate path, following the listed Windows and Paket 7.2.0 steps. Then trace Paket's NuGet cache and restore handling; done means restores use the configured environment-variable path and the solution builds successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.