-
Notifications
You must be signed in to change notification settings - Fork 13
/
setmsbuild.cmd
35 lines (31 loc) · 1012 Bytes
/
setmsbuild.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
:: Do nothing if the msbuild variable has been set.
@IF NOT ["%msbuild%"] == [""] GOTO :EOF
:: Use VS2015 if installed.
@IF ["%msbuild%"] == [""] (
IF EXIST "%VS140COMNTOOLS%vsvars32.bat" (
echo Setting up variables for Visual Studio 2015.
CALL "%VS140COMNTOOLS%vsvars32.bat"
SET msbuild=MSBuild.exe
)
)
:: Use VS2013 if installed.
@IF ["%msbuild%"] == [""] (
IF EXIST "%VS120COMNTOOLS%vsvars32.bat" (
echo Setting up variables for Visual Studio 2013.
CALL "%VS120COMNTOOLS%vsvars32.bat"
SET msbuild=MSBuild.exe
)
)
:: Use VS2012 if installed.
@IF ["%msbuild%"] == [""] (
IF EXIST "%VS110COMNTOOLS%vsvars32.bat" (
echo Setting up variables for Visual Studio 2012.
CALL "%VS110COMNTOOLS%vsvars32.bat"
SET msbuild=MSBuild.exe
)
)
:: Fall back MSBuild bundled with .NET.
@IF ["%msbuild%"] == [""] (
echo Using MSBuild from from .NET 4.0.
SET msbuild="%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
)