Created
March 8, 2017 10:29
-
-
Save jhorsman/deb1e4bda7cbc58ea58939810946d60e to your computer and use it in GitHub Desktop.
Install and update NuGet with PowerShell
This file contains 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
IF (-NOT (Test-Path ".nuget\nuget.exe")) | |
{ | |
Write-Verbose "Install NuGet" | |
New-Item -ItemType Directory ".nuget" | Out-Null | |
Invoke-WebRequest "https://www.nuget.org/nuget.exe" -OutFile ".nuget\nuget.exe" -UseBasicParsing | |
} | |
Write-Verbose "Update NuGet" | |
& ".\.nuget\nuget.exe" update -self |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment