How to push nupkg file to Azure DevOps feed?

3k views Asked by At

I have .nupkg file that I would like to add to the feed I've created in Azure DevOps. The feed is called Feed. Unfortunately, the only way I see right now is to polute the repo by pushing the file by Git and then creating a release definition that pushes it into the correct feed. Like here:

enter image description here

Can I somehow upload .nupkg file directly from my drive? I don't have source code for the file, I won't build it.

1

There are 1 answers

5
Shayki Abramczyk On

You can publish the .npukg from your drive with the command line, you just need to nuget.exe installed (if you have Visual Studio so you have it).

1) Add the feed as a source:

nuget.exe sources Add -Name "FeedName" -Source "https://pkgs.dev.azure.com/{organization}/_packaging/NugetTest/nuget/v3/index.json" 

2) Push the file to the feed:

nuget.exe push -Source "FeedName" -ApiKey az <packagePath> (e.g. C:/test.nupkg)