-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.cmd
35 lines (28 loc) · 838 Bytes
/
build.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
@ECHO OFF
set framework_version=3.5
set msb=%windir%\Microsoft.NET\Framework\v%framework_version%\MSBuild.exe
set project=Common.Configuration\Common.Configuration.csproj
set outdir=Common.Configuration\obj\Push
set basename=Common.Configuration
set releasedir=Release
if not exist %msb% goto msbuild_not_found
goto do_build
:do_build
echo Building the project ...
if not exist %outdir% mkdir %outdir%
%msb% /target:Build /property:Configuration=Release /property:OutDir=..\%releasedir%\ "%project%"
if errorlevel 1 goto build_error
goto build_ok
:build_ok
goto end
:msbuild_not_found
echo MSBuild not found (exptected version of .NET Framework: %framework_version%)
if not "%1" == "batch" pause
exit 1
:build_error
echo Error while building the project.
if not "%1" == "batch" pause
exit 2
:end
if not "%1" == "batch" pause
exit 0