Monday 3 February 2020

Pushing NuGet Packages to Azure DevOps Artifact Feeds Manually

In the build pipelines of Azure DevOps we can easily push a NuGet package, using a NuGet push step and selecting the artifact feed, in the Azure DevOps organization or team project. But you may sometimes need to push packages manually to Azure Artifact feeds. Let’s look at how we can do that.
In Azure DevOps artifact feed you can click connect feed to see the feed connection information.

In the feed connection information, you can find the instructions on how to push a package. The highlighted url below should be the url to access the package feed.

As you can see in above publish package instructions, you can setup a command like shown below. The API key can be any test value and we can just use it as key as shown below.
nuget push -Source https://pkgs.dev.azure.com/yourorg/yourteamproject/_packaging/feedname/nuget/v3/index.json -ApiKey key yourpackcgefile.x.x.x.x.nupkg

When you execute the command you will be prompted to log on to Azure DevOps and you should login with a user who has access to the feed to push packages.

Once logged in the NuGet package will be pushed to the feed.


No comments:

Popular Posts