From 3c3f3ee1c33eb44e13a8690b99b8074fd286bff8 Mon Sep 17 00:00:00 2001 From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> Date: Wed, 20 Aug 2025 12:03:29 -0400 Subject: [PATCH] [CI] Fix VCToolsVersion script for PowerShell 7 --- .pipelines/verifyAndSetLatestVCToolsVersion.ps1 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 b/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 index 1200ec13fa..54a48817f6 100644 --- a/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 +++ b/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 @@ -1,7 +1,4 @@ -$extraVersionTarget = ""; -if($env:VCWhereExtraVersionTarget) { - $extraVersionTarget = "`"$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 $LatestVCPackage = ($VSPackages | ? { $_.id -eq "Microsoft.VisualCpp.Tools.Core" })