Skip to content

Commit b8ff2c8

Browse files
committed
fixes vswhere build script
1 parent 146674c commit b8ff2c8

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

Build-Release.ps1

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,9 @@ else {
5151
mv "$dir\$file" $vswhere
5252
}
5353

54-
$MSBuild = &$vswhere -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
55-
#TO get this working with pre-release use:
56-
#$MSBuild = &$vswhere -prerelease -property installationPath
57-
58-
if ($MSBuild) {
59-
60-
$MSBuild = join-path $MSBuild 'MSBuild\15.0\Bin\MSBuild.exe'
61-
#TO get this working with pre-release use:
62-
#$MSBuild = join-path $MSBuild 'MSBuild\Current\Bin\MSBuild.exe'
63-
64-
if (-not (test-path $msbuild)) {
65-
throw "MSBuild not found!"
66-
}
54+
$MSBuild = &$vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1
55+
if (-not (test-path $MSBuild)) {
56+
throw "MSBuild not found!"
6757
}
6858
}
6959

0 commit comments

Comments
 (0)