1

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.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
Yoda
  • 17,363
  • 67
  • 204
  • 344

1 Answers1

1

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)
Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
  • I got `Your package was pushed` message, but I can't see it in Azure DevOps is there a way to see available packages? There was 2 years ago, but I can't find it now. – Yoda Jan 29 '20 at 17:00
  • How have you came up with `"https://pkgs.dev.azure.com/{organization}/_packaging/NugetTest/nuget/v3/index.json"` json at the end? I've just cut url from browser when I connected to feed in it. I suspect this is not the way, however I got no errors in command line. `16111ms Your package was pushed.` – Yoda Jan 29 '20 at 17:03
  • When I tried to go this way `https://pkgs.dev.azure.com/{organization}/{project}/_packaging/{feedName}/nuget/v3/index.json` I got `NuGet.Protocol.Plugins.ProtocolException: An error occurred while sending the request.` – Yoda Jan 29 '20 at 17:12
  • I also tried from Package Manager Console: `dotnet nuget push --source "feedname" --api-key az "packagefile"` but I got `Response status code does not indicate success: 401 (Unauthorized).` with no popup for credentials or sth similar – Yoda Jan 29 '20 at 17:27
  • Check here https://learn.microsoft.com/en-us/azure/devops/artifacts/get-started-nuget?view=azure-devops#get-your-feeds-nuget-package-source-information and here https://github.com/microsoft/artifacts-credprovider#azure-artifacts-credential-provider – Shayki Abramczyk Jan 29 '20 at 19:10