NuGet / Home

Repo for NuGet Client issues
Other
1.5k stars 253 forks source link

dotnet nuget push to local feeds should use v3 folder structure #7383

Open zivkan opened 6 years ago

zivkan commented 6 years ago

dotnet nuget push MyPackage.1.0.0.nupkg -s ~/myFeed/ to an empty folder defaults to a v2 feed. It should default to a v3 feed, so on linux if I hand edit a PackageReference and get the case wrong, it can still find the package.

thomassuckow commented 4 years ago

You mention an empty folder, does it use v3 if something specific is present?

zivkan commented 4 years ago

I believe that NuGet does a very quick and basic inspection of the directory and if the first thing it looks at appears to be a v3 folder structure, then it treats it as v3, otherwise it assumes v2. So, if the directory is already v3, then pushing more packages to it should correctly keep using v3. Seeding that first package is an issue without nuget.exe (nuget.exe add should always use the v3 folder structure).

thomassuckow commented 4 years ago

Ya, I just figured that out. What it seems to be looking for is a file matching foo/anything/foo.nuspec The file can even be empty.