Skip to content

Conversation

@marksvc
Copy link
Contributor

@marksvc marksvc commented Apr 12, 2022

No description provided.

johnml1135 added a commit that referenced this pull request Dec 5, 2025
NuGet restore was failing inside Docker containers with "Could not find
a part of the path" errors when writing to the bind-mounted packages/
folder. Docker bind mounts have issues with NuGet's atomic file
operations and file locking.

Changes:
- Set NUGET_PACKAGES environment variable in container invocations
- Remove explicit --packages flag from RestorePackages target to let
  NuGet use the global cache (respects NUGET_PACKAGES or defaults to
  %USERPROFILE%\.nuget\packages)

Benefits:
- Fixes Docker container builds for git worktrees
- Reduces disk usage (~2GB shared vs duplicated per worktree)
- Faster restores via shared cache hits
- Matches CI behavior and .NET ecosystem conventions

Closes #7-test-modernization-vstest container build issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants