From de96b89867c432496ab34f04ac2a53e4473d1a1a Mon Sep 17 00:00:00 2001 From: Liryna Date: Sat, 30 Apr 2022 08:20:25 -0400 Subject: [PATCH] Build - Fix Add-VisualStudio-Path when multiple VS are installed --- scripts/build_helper.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_helper.ps1 b/scripts/build_helper.ps1 index 5248e7701..9611002fa 100644 --- a/scripts/build_helper.ps1 +++ b/scripts/build_helper.ps1 @@ -9,7 +9,7 @@ function Exec-External { } function Add-VisualStudio-Path { - $vsPath = & "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath + $vsPath = (& "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath).Split([Environment]::NewLine) | Select -First 1 $msBuild_VSPath = "$vsPath\MSBuild\Current\Bin" if (!(Test-Path -Path $msBuild_VSPath)) {