Open vivainio opened 4 years ago
I am using dotnet nuget push -s
for copying a local package into the local cache and have noticed the following behaviour:
This unexpected behavior makes it difficult to suggest dotnet nuget push -s
as generic way to install packages to the local cache, because it only works if there are already other packages in the cache. It will not work for a clean installation.
Looking at the NuGet client source, my observations are confirmed. The client uses a heuristic to decide whether the offline feed is in v2 or v3 format. If the folder is completely empty, it defaults to v2 which means it will not create the hierarchic structure that NuGet expects for the cache folder.
Details about Problem
dotnet.exe --version: 3.1.101
OS version:
win10 1803
Detailed repro steps so we can see the same problem
Observe that c:/localdir now contains myapp.1.3.0.nupkg at top level instead of the "new" hierarchical nuget directory structure.