Solved

Simple build of a VS2012 solution using a batch file

Posted on 2013-11-11
1
942 Views
Last Modified: 2014-01-05
Hi Experts,

     I am trying to FINALLY automate our build process.  I am able to build our solution using the below command in a batch file:

devenv "C:\Projects\MySolution.sln" /build Release /out "C:\Build.Log"

How can I give the user (QA folks) running the batch file a simple pass/fail message instead of the lines of warnings and other messages?

I am looking for something like:

set success = devenv "C:\Projects\MySolution.sln" /build Release /out "C:\2012Build.Log"

if success < 0
(
      ECHO "Solution 'MySolution' failed to build.  Please check log file for details"
)
else
(
     set success = devenv "C:\Projects\MySolution2.sln" /build Release /out "C:\2012Build.Log"

     if success < 0
     (
           ECHO "Solution 'MySolution2' failed to build.  Please check log file for details"
     )
     else
     (
           ECHO "Build process has completed without any errors!"
     )
)

Thanks in advance!
0
Comment
Question by:axnst2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
Peter Hutchison earned 500 total points
ID: 39639212
Run devenv.com instead of devenv.exe and use the ERRORLEVEL in a IF statement to check whether it compiled ok.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Starting up a Project

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question