Arcade overrides globalPackagesFolder to corrupt the shared NuGet cache
- Dominant language
- C#
- Stars
- 729
- Forks
- 397
- Avg merge
- 3d 15m
- Merged PRs (30d)
- 149
Description
### Steps to reproduce
1. Create a local temporary build of some packages for testing
2. Add the packages from (1) to ``
3. Set `globalPackagesFolder` in **NuGet.config** to avoid having the packages from (1) corrupt the shared cache
```xml
```
4. Restore the solution
### Expected results
Arcade/NuGet restores packages to the **./artifacts/package-cache** folder to avoid corrupting per-user cache with temporary artifacts.
### Actual results
The restore process ignores this [standard configuration property](https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#config-section) and corrupts the cache anyway.
It appears one of the following lines are responsible for this unexpected behavior:
https://github.com/dotnet/arcade/blob/2dcda00eea68bb9f0a52fd3302c3100b29a7197f/src/Microsoft.DotNet.Arcade.Sdk/tools/RepoLayout.props#L15-L19
https://github.com/dotnet/arcade/blob/2dcda00eea68bb9f0a52fd3302c3100b29a7197f/eng/common/tools.ps1#L543-L558
Contributor guide
Assessment
This issue has not been assessed yet.