I'm trying to push multiple nuget packages at ONCE to private VSTS nuget server.
I searched doco but could not find a batch Push command. I'm using the command below which seems to overwrite already existing nuget packages on VSTS.
nuget push mynuget.nupkg -Source https://myvsts.pkgs.visualstudio.com/DefaultCollection/_packaging/SitecorePackages/nuget/v3/index.json -ApiKey VSTS
UPDATE:
I used the push *.nupkg however, I can see only the 8.1.x version pushed.
Thanks.
To add the private NuGet feed link using Visual Studio. Launch Visual Studio, right-click the project, and choose Manage NuGet Packages. Click the + button after selecting the Package Manager setting. Select Okay after providing the Name and Source (URL) of your NuGet Feed.
To use any command, open a command window or bash shell, then run nuget followed by the command and appropriate options, such as nuget help pack (to view help on the pack command). This documentation reflects the latest version of the NuGet CLI.
nuspec file is an XML manifest that contains package metadata. This manifest is used both to build the package and to provide information to consumers. The manifest is always included in a package. In this topic: General form and schema.
It's not possible to overwrite existing packages on VSTS. nuget.exe allows wildcards for push, so you could say nuget push *.nupkg -Source https://myvsts.pkgs.visualstudio.com/DefaultCollection/_packaging/SitecorePackages/nuget/v3/index.json -ApiKey VSTS
.
Here is a powershell script you can use to bulk push NuGet packages to a VSTS feed. It will ignore any of the .symbols.nuget files:
set-location \\path\to\nugetpackages
$files=get-childitem | where {$_.Name -like "*.nupkg" -and $_.Name -notlike "*symbols*"}
foreach($file in $files) {
.\NuGet.exe push -Source "MySource" -ApiKey key $file.name
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With