Skip to content
This repository was archived by the owner on Jul 12, 2022. It is now read-only.

Commit 4fe2173

Browse files
committed
Add a helpful message when tools are missing
While you can build the unit tests and run them without Visual Studio 2015 (or the build tools) installed, you need to have it installed to run the program or build.cmd. Generate a helpful error when these are missing.
1 parent d567fea commit 4fe2173

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build.cmd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ SETLOCAL
44

55
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
66
SET SOLUTION_PATH=%~dp0src\CodeFormatter.sln
7+
SET VS2015_BUILD_TOOLS_PATH="%ProgramFiles(x86)%\MSBuild\14.0\bin\MSBuild.exe"
8+
9+
IF NOT EXIST %VS2015_BUILD_TOOLS_PATH% (
10+
echo In order to build or run this tool you need either Visual Studio 2015 Preview or
11+
echo Microsoft Build Tools 2015 Preview tools installed.
12+
echo.
13+
echo Visit http://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs
14+
echo to download either.
15+
goto :eof
16+
)
717

818
IF EXIST %CACHED_NUGET% goto restore
919
echo Downloading latest version of NuGet.exe...

0 commit comments

Comments
 (0)