Publish a NuGet package using the command line
Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2017
With Azure Artifacts, you can publish your NuGet packages to public or private feeds, and then share them with others depending on your feed's visibility settings.
Connect to a NuGet feed
From within your project, select Artifacts, and then select your feed. You can create a new feed if you don't have one already.
Select Connect to feed.
Select NuGet.exe under the NuGet header.
If this is the first time using Azure Artifacts with Nuget.exe, select Get the tools button and follow the instructions to install the prerequisites.
- Download the latest NuGet version.
- Download and install the Azure Artifacts Credential Provider.
Follow the instructions in the Project setup to connect to your feed.
Publish a NuGet package by using the command line
If you don't have a NuGet package but you want to try publishing your package to your feed, you can install the HelloWorld sample package.
nuget install HelloWorld -ExcludeVersion
Run the following command to publish your package to your feed:
nuget.exe push -Source "<YOUR_FEED_NAME>" -ApiKey <ANY_STRING> <PACKAGE_PATH>
Select Build and Release > Packages.
Select your feed from the dropdown menu or create one if you haven't.
Select Connect to feed.
Select NuGet and follow the instruction to connect to your feed.