Skip to content

Batch script to build project from command line #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 11, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the build script.

Please add the following capability to make the script more robust:

  1. Detect the presence of VS tools, else bail out gracefully

  2. Specify these in msbuild:
    /p:Configuration
    /l: logging when building

setlocal
if "%VS120COMNTOOLS%"=="" GOTO NOTOOLS
call "%VS120COMNTOOLS%\VsDevCmd.bat"
msbuild .\PSScriptAnalyzer.sln /p:Configuration=Debug /l:FileLogger,Microsoft.Build.Engine;logfile=PSScriptAnalyzer_Build.log;append=true
if NOT [%ERRORLEVEL%]==[0] pause

GOTO END

:NOTOOLS
echo The Visual Studio 2013 tools are not installed
pause

:END
endlocal