PowerToys/.pipelines/verifyAndSetLatestVCToolsVersion.ps1
Jeremy Sinclair fa6fec9bf9
[ci]Point VCToolsVersion to latest VC.CRT version instead of VC.Redist version (#31212)
* [CI] Point VCToolsVersion to latest VC.Tools version instead of VC.Redist version

* Update verifyAndSetLatestVCToolsVersion.ps1

* Use VisualCpp.CRT.Source version.
2024-01-31 14:58:59 +00:00

6 lines
515 B
PowerShell

$LatestVCToolsVersion = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.CRT.Source" }).version;
Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
Write-Output "Updating VCToolsVersion environment variable for job"
Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"