Don't download nupkg. nuget.exe auto-downloads it

This commit is contained in:
Alexander Karatarakis 2017-02-06 15:26:35 -08:00
parent 5b7dc56268
commit 7207316ed4

View File

@ -14,29 +14,6 @@ $nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget"
$nugetPackageDir = "$downloadsDir\nuget-packages"
$SetupAPIVersion = "1.3.269-rc"
$url = "https://api.nuget.org/packages/microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg"
$downloadName = "microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg"
$downloadPath = "$downloadsDir\$downloadName"
if (!(Test-Path $downloadPath))
{
try {
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
}
catch [System.Exception] {
# If BITS fails for any reason, delete any potentially partially downloaded files and continue
if (Test-Path $downloadPath)
{
Remove-Item $downloadPath
}
}
}
if (!(Test-Path $downloadPath))
{
Write-Host("Downloading $downloadName...")
(New-Object System.Net.WebClient).DownloadFile($url, $downloadPath)
}
$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1
$SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe"