Skip to content

Commit

Permalink
Modify install batch to use vswhere.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbetros committed Apr 4, 2017
1 parent eb174e4 commit 3f3f822
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
Binary file added Build/Tools/vswhere.exe
Binary file not shown.
27 changes: 26 additions & 1 deletion install-VS2017.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
@echo off
cls

powershell -File install-VS2017.ps1 %1 %2 %3 %4 %5 %6 %7 %8 %9
set NuGet=Build\Tools\nuget.exe
set VSWhere=Build\Tools\vswhere.exe

goto :MSBuild

:NuGet
echo Running NuGet restore
%NuGet% restore Builder.sln
%NuGet% restore Cosmos.sln

:MSBuild
echo Looking for MSBuild
for /f "usebackq tokens=1* delims=: " %%i in (`%VSWhere% -latest -version "[15.0,16.0)" -requires "Microsoft.Component.MSBuild" -property "installationPath"`) do (
set InstallDir=%%j
)

if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
set MSBuild="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"
)

if exist %MSBuild% (
%MSBuild% Builder.sln /nologo /maxcpucount /p:Configuration="Debug" /p:Platform="Any CPU"
)

"source\Cosmos.Build.Builder\bin\Debug\Cosmos.Build.Builder.exe" "-bat" "-VS2017" "%InstallDir%"

0 comments on commit 3f3f822

Please sign in to comment.