Nuget restore with --packages does not work as expected. The deprecated folder C:\Program Files\dotnet\sdk\NuGetFallBackFolder is still used silently. #13588
Labels
Functionality:Restore
Product:dotnet.exe
Resolution:NeedMoreInfo
This issue appears to not have enough info to take action
Type:Bug
WaitingForCustomer
Applied when a NuGet triage person needs more info from the OP
NuGet Product Used
dotnet.exe
Product Version
6.0.420 [C:\Program Files\dotnet\sdk]
Worked before?
Never
Impact
It bothers me. A fix would be nice
Repro Steps & Context
I wanted to use the dotnet restore --package "packages" --force to restore all packages of my solution into the "packages" folder. No matter what I did I got different results on different computers.
Event after clearing the nuget cache with dotnet nuget locals all --clear i did not get the same number of restored packages.
I found out that the previous directory "C:\Program Files\dotnet\sdk\NuGetFallBackFolder" which was used prior to .NET 3.0 Core was still considered as cache. If the nuget package was already present in the C:\Program Files\dotnet\sdk\NuGetFallBackFolder the nuget package was not saved to the packages folder.
I would expect, using dotnet restore --force would take care of really considering all packages and store them, not only those which are in the official dotnet nuget cache lists.
I also would think that if something got removed and deprecated the C:\Program Files\dotnet\sdk\NuGetFallBackFolder is not of concern anyhow and should be ignored.
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: