Skip to content

Instantly share code, notes, and snippets.

@jhorsman
Created March 8, 2017 10:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhorsman/deb1e4bda7cbc58ea58939810946d60e to your computer and use it in GitHub Desktop.
Save jhorsman/deb1e4bda7cbc58ea58939810946d60e to your computer and use it in GitHub Desktop.
Install and update NuGet with PowerShell
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