forked from dotnet/msbuild
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildAndCopy.cmd
50 lines (41 loc) · 1.31 KB
/
BuildAndCopy.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
:: Usage:
:: BuildAndCopy
::
:: Example: BuildAndCopy.cmd
@echo off
setlocal
set DebugBuildOutputPath=%~dp0bin\Windows_NT\Debug
:: Check prerequisites
if not defined VS140COMNTOOLS (
echo Error: This script should be run from a Visual Studio 2015 Command Prompt.
echo Please see https://github.com/Microsoft/msbuild/wiki/Building-Testing-and-Debugging for build instructions.
exit /b 1
)
if not "%1"=="" (
set OutputPath=%1
)
echo ** Building with the installed MSBuild
echo ** Output Path: %DebugBuildOutputPath%
echo ** Additional Build Parameters:%AdditionalBuildCommand%
echo.
:: Build MSBuild
call "%~dp0build.cmd" /t:Rebuild %AdditionalBuildCommand%
set BUILDERRORLEVEL=%ERRORLEVEL%
:: Kill Roslyn, which may have handles open to files we want
taskkill /F /IM vbcscompiler.exe
if %BUILDERRORLEVEL% NEQ 0 (
echo.
echo Failed to build with errorlevel %BUILDERRORLEVEL% 1>&2
exit /b %BUILDERRORLEVEL%
)
:: Make a copy of our build
echo ** Copying bootstrapped MSBuild to the bootstrap folder
msbuild /verbosity:minimal CreatePrivateMSBuildEnvironment.proj
if %ERRORLEVEL% NEQ 0 (
echo.
echo Failed building CreatePrivateMSBuildEnvironment.proj with error %ERRORLEVEL%
exit /b %ERRORLEVEL%
)
echo.
echo ** Packaging complete.
echo ** MSBuild = %~dp0\bin\bootstrap\14.1\MSBuild.exe