Skip to content

Commit b869d27

Browse files
authored
[ci] Do not try to modify classic VSIX install (#8518)
We are no longer regularly installing arbitrary preview versions of the classic XA VSIX on our Windows pool. We can save some windows build time by not attempting to modify VS.
1 parent 8f33823 commit b869d27

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

build-tools/automation/yaml-templates/build-windows.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,6 @@ stages:
4545
parameters:
4646
remove_dotnet: true
4747

48-
# Downgrade the XA .vsix installed into the instance of VS that we are building with so that we don't restore/build against a test version.
49-
# The VS installer will attempt to resume any failed or partial installation before trying to downgrade Xamarin.Android.
50-
# VSIXInstaller.exe will exit non-zero when the downgrade attempt is a no-op, so we will allow this step to fail silently.
51-
- powershell: |
52-
$vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
53-
& "$vsWhere" -all -prerelease -latest | Out-Default
54-
$isLatestVSLaunchable = & "$vsWhere" -all -prerelease -latest -property isLaunchable
55-
if ($isLatestVSLaunchable -eq 0) {
56-
$vsPath = & "$vsWhere" -all -prerelease -latest -property installationPath
57-
Write-Host "Attempting to repair VS instance:" $vsPath
58-
$vsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
59-
& "$vsInstaller" resume --installPath $vsPath --quiet --norestart | Out-Default
60-
Write-Host "vs_installer.exe resume attempt complete"
61-
}
62-
$vsixInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe"
63-
$ts = Get-Date -Format FileDateTimeUniversal
64-
$log = "xavsixdowngrade-$ts.log"
65-
$process = Start-Process -NoNewWindow -FilePath $vsixInstaller -ArgumentList "/downgrade:Xamarin.Android.Sdk /admin /quiet /logFile:$log" -Wait -PassThru -RedirectStandardError "err.txt"
66-
Get-Content "err.txt" | Write-Host
67-
Get-Content "${env:TEMP}\$log" | Write-Host
68-
Write-Host "VSInstaller.exe exited with code:" $process.ExitCode
69-
Remove-Item "${env:TEMP}\$log"
70-
displayName: downgrade XA to stable
71-
ignoreLASTEXITCODE: true
72-
7348
- task: DotNetCoreCLI@2
7449
displayName: Prepare Solution
7550
inputs:

0 commit comments

Comments
 (0)