Skip to content

Commit afac9d6

Browse files
Josh GoldbergDaniel15
Josh Goldberg
authored andcommitted
Allowed Community, Enterprise, or Professional VS 2017 versions (#457)
Loops over the potential MSBuild.exe paths for all three, and runs with the first one. If one isn't found it complaints.
1 parent 1c57246 commit afac9d6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dev-build.bat

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
@echo off
2-
"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" build.proj
2+
3+
for %%s in (
4+
"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe"
5+
"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe"
6+
"%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe"
7+
) do (
8+
if exist %%s (
9+
echo %%s build.proj
10+
%%s build.proj
11+
goto :done
12+
)
13+
)
14+
15+
:notfound
16+
echo Could not find MSBuild.exe. Make sure Visual Studio 2017 is installed and try again.
17+
18+
:done
319
pause

0 commit comments

Comments
 (0)