forked from microsoft/ConcordExtensibilitySamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build.cmd/netci.groovy to use VS2017 (microsoft#41)
- Loading branch information
1 parent
627fe75
commit 651c7aa
Showing
2 changed files
with
23 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,34 @@ | ||
@echo off | ||
setlocal | ||
|
||
if not defined VisualStudioVersion ( | ||
if defined VS140COMNTOOLS ( | ||
call "%VS140COMNTOOLS%\VsDevCmd.bat" | ||
goto :EnvSet | ||
) | ||
if NOT "%VSINSTALLDIR%"=="" goto InDevPrompt | ||
|
||
echo Error: build.cmd requires Visual Studio 2015. | ||
exit /b 1 | ||
) | ||
set x86ProgramFiles=%ProgramFiles(x86)% | ||
if "%x86ProgramFiles%"=="" set x86ProgramFiles=%ProgramFiles% | ||
set VSWherePath=%x86ProgramFiles%\Microsoft Visual Studio\Installer\vswhere.exe | ||
if NOT exist "%VSWherePath%" echo ERROR: Could not find vswhere.exe (%VSWherePath%). Ensure that Visual Studio 2017 version 15.5 or newer is installed. & exit /b -1 | ||
|
||
if not exist "%VSSDK140Install%" ( | ||
echo Error: build.cmd requires the Visual Studio SDK to be installed. | ||
exit /b 1 | ||
) | ||
for /f "usebackq tokens=1 delims=" %%a in (`"%VSWherePath%" -version [15.0, -prerelease -property installationPath`) do call :ProcessIDE "%%a" | ||
if NOT "%VSINSTALLDIR%"=="" goto InDevPrompt | ||
|
||
echo ERROR: Unable to find a Visual Studio install. | ||
exit /b -1 | ||
|
||
:InDevPrompt | ||
set _buildproj=%~dp0BuildAndTest.proj | ||
set _buildlog=%~dp0msbuild.log | ||
set MSBuildCmd=msbuild "%_buildproj%" /nologo /maxcpucount /nodeReuse:false %* | ||
|
||
msbuild "%_buildproj%" /nologo /maxcpucount /nodeReuse:false %* | ||
echo %MSBuildCmd% | ||
call %MSBuildCmd% | ||
set BUILDERRORLEVEL=%ERRORLEVEL% | ||
|
||
echo Build Exit Code = %BUILDERRORLEVEL% | ||
exit /b %BUILDERRORLEVEL% | ||
exit /b %BUILDERRORLEVEL% | ||
|
||
:ProcessIDE | ||
if NOT "%VSINSTALLDIR%"=="" goto :EOF | ||
if NOT exist "%~1\Common7\Tools\VsDevCmd.bat" goto :EOF | ||
echo Using Visual Studio from %1 | ||
call "%~1\Common7\Tools\VsDevCmd.bat" | ||
goto :EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters