From 53c386ae045a2456d310755b00c5750f36ede8bf Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 16 Feb 2021 16:24:02 -0800 Subject: [PATCH] Fix Bootstrap step in Windows daily test runs --- .vsts-ci/windows-daily.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vsts-ci/windows-daily.yml b/.vsts-ci/windows-daily.yml index dd3ad6ef2f8..f15d0926d1d 100644 --- a/.vsts-ci/windows-daily.yml +++ b/.vsts-ci/windows-daily.yml @@ -99,6 +99,17 @@ stages: # must be run frow Windows PowerShell - powershell: | + # Remove "Program Files\dotnet" from the env variable PATH, so old SDKs won't affect us. + Write-Host "Old Path:" + Write-Host $env:Path + + $dotnetPath = Join-Path $env:SystemDrive 'Program Files\dotnet' + $paths = $env:Path -split ";" | Where-Object { -not $_.StartsWith($dotnetPath) } + $env:Path = $paths -join ";" + + Write-Host "New Path:" + Write-Host $env:Path + Import-Module .\tools\ci.psm1 Invoke-CIInstall displayName: Bootstrap