Solved

Simple build of a VS2012 solution using a batch file

Posted on 2013-11-11
1
928 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 19

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

Suggested Solutions

Title # Comments Views Activity
Convert .csv to tab delimited text 11 77
WordPress: Debugging from my Windows 10 Desktop 6 93
How Do I Widen a Column in a SharePoint 2013 List 2 64
Java array 10 86
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

732 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