mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-29 13:37:43 +00:00
[CI] Update VCToolsVersion detection to conditionally pass prerelease flag
This commit is contained in:
parent
aa7bb45cc2
commit
450bfcc1d4
@ -1,9 +1,13 @@
|
|||||||
$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))
|
$extraVersionTarget = "";
|
||||||
|
if($env:VCWhereExtraVersionTarget) {
|
||||||
|
$extraVersionTarget = "`"$env:VCWhereExtraVersionTarget`"";
|
||||||
|
}
|
||||||
|
$VSInstances = ([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest $extraVersionTarget -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml))
|
||||||
$VSPackages = $VSInstances.instances.instance.packages.package
|
$VSPackages = $VSInstances.instances.instance.packages.package
|
||||||
$LatestVCPackage = ($VSPackages | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })
|
$LatestVCPackage = ($VSPackages | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })
|
||||||
$LatestVCToolsVersion = $LatestVCPackage.version;
|
$LatestVCToolsVersion = $LatestVCPackage.version;
|
||||||
|
|
||||||
$VSRoot = (& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property 'resolvedInstallationPath')
|
$VSRoot = (& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest $extraVersionTarget -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property 'resolvedInstallationPath')
|
||||||
$VCToolsRoot = Join-Path $VSRoot "VC\Tools\MSVC"
|
$VCToolsRoot = Join-Path $VSRoot "VC\Tools\MSVC"
|
||||||
|
|
||||||
# We have observed a few instances where the VC tools package version actually
|
# We have observed a few instances where the VC tools package version actually
|
||||||
|
Loading…
x
Reference in New Issue
Block a user