jan-h
3/8/2017 - 10:29 AM

Install and update NuGet with PowerShell

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