Solved

Simple build of a VS2012 solution using a batch file

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now