NuGet.org had TLS 1.0 and 1.1 disabled - https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/.
Therefore we need this line specifying Tls12
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
if (-not (test-path $nuget))
|
||||
{
|
||||
Write-Host "Download NuGet..."
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
Invoke-WebRequest $source -OutFile $nuget
|
||||
if (-not $?) { throw "Failed to download NuGet." }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user