Skip to content

Commit efcf0a4

Browse files
authored
fix: take latest vs install if multiple instances exist with vswhere.exe (#4939)
1 parent 53d551f commit efcf0a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function VSX
184184
$versionSearchStr = "[$VS_VER.0," + ($VS_VER+1) + ".0)"
185185

186186
$ErrorActionPreference="SilentlyContinue"
187-
$VSInstallPath = & $VSWherePath -version $versionSearchStr -property installationPath $VS_PRE
187+
$VSInstallPath = & $VSWherePath -version $versionSearchStr -latest -property installationPath $VS_PRE
188188
$ErrorActionPreference="Stop"
189189

190190
Write-Diagnostic "$($VS_OFFICIAL_VER)InstallPath: $VSInstallPath"

0 commit comments

Comments
 (0)