Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
Download a NuGet package using cmd
-
I followed "https://docs.inedo.com/docs/proget-feeds-nuget" to download the package as follows:
#https://«proget-server»/«feed-name»/«packageName»/«versionNumber[optional]»
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("X-ApiKey", "xyz")$response = Invoke-RestMethod 'https://ip:port/feedname/nuget-paclkage-name/version' -Method 'GET' -Headers $headers
$response | ConvertTo-JsonI got the error:
Invoke-RestMethod :
Not FoundMy question, how can I download a NuGet package as file (e.g., zip)?
-
Hi @hashim-abu-gellban_3562,
I see a few issues here...
First, the URL you're using is not correct; the easiest way to to find the url by clicking the "download package link" in the ProGet UI. It will look like this:
/nuget/your-feed-name/package/your-package-name/your-version-numberSecond, you're downloading a file - so you want to use a powershell command like this:
$url = "https://myprogetserver/feeds/mynuggets/package/mypackage/1.0.0" $destination = "c:\mypackages\mypackage-1.0.0.zip" Invoke-WebRequest -Uri $url -OutFile $destinationBest,
Steve
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login