File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments