Created
September 15, 2016 09:38
-
-
Save patriksvensson/59b83c9afaf0b2cc12a729f1cf7d89be to your computer and use it in GitHub Desktop.
Download NuGet package
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-NuGetPackage( | |
[string]$Source = "http://nuget.org", | |
[string]$Package, | |
[string]$Version) | |
{ | |
$Url = "$Source/api/v2/package/$Package/$Version" | |
$Output = Join-Path (Get-Location) "$Package.$Version.nupkg" | |
(New-Object System.Net.WebClient).DownloadFile($Url, $Output) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment