mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[ci]Proper workaround for the vc tools version check (#37130)
* Revert "[ci]Remove vc tools version workaround (#37098)"
This reverts commit 2c069ce708.
* Adopt the same workaround as in Terminal
This commit is contained in:
7
.pipelines/verifyAndSetLatestVCToolsVersion.ps1
Normal file
7
.pipelines/verifyAndSetLatestVCToolsVersion.ps1
Normal file
@@ -0,0 +1,7 @@
|
||||
$VSInstances = ([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml))
|
||||
$VSPackages = $VSInstances.instances.instance.packages.package
|
||||
$LatestVCPackage = ($VSInstances.instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })
|
||||
$LatestVCToolsVersion = $LatestVCPackage.version;
|
||||
Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
|
||||
Write-Output "Updating VCToolsVersion environment variable for job"
|
||||
Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"
|
||||
Reference in New Issue
Block a user