Open
Description
NuGet Product(s) Involved
NuGet SDK
The Elevator Pitch
Package source mapping currently requires a manual onboarding step of clearing out the global packages folder.
dotnet nuget locals global-packages -c
https://learn.microsoft.com/en-us/nuget/consume-packages/package-source-mapping#manual-onboarding
To make this easier for the end-user to have things "just work", we should reconsider this step:
When you restore packages for a project, NuGet will first look in the global package folder to see if the required packages are already installed there. If they are, NuGet will use them, instead of downloading them again.
Instead, NuGet should overwrite any defined package ID included in source mapping forcing a download so manual steps can be reduced and room for error lessens.
Additional Context and Details
No response