[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

MS Visual Studio command line building

Posted on 2007-10-18
6
Medium Priority
?
1,146 Views
Last Modified: 2012-05-05
I'm using:
devenv.exe <solution.sln> /Build "Debug|Win32"

VS does the build in the background... I can see cl.exe running several times... however I'd like to get status output on my screen as it builds. I'm using VS 8.0. Does anyone know how to get it to dump this info for me?
0
Comment
Question by:jimstar
  • 3
  • 2
6 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 20104578
You can just open BuildLog.htm in the project's output directory.
0
 
LVL 4

Author Comment

by:jimstar
ID: 20104640
I saw the file, but I'd rather have it output directly to the screen. The problem right now is that the build executes in the background and lets commands following the build command execute immediately in a batch file. I want to wait until the build is done before it continues on with the remaining batch commands.

I could rig up some sort of polling mechanism, but I am really looking to have it build in the foreground so I can get a result code indicating success/failure and then carry on with my build script or exit with a failure.
0
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 20104676
Regarding the build results, 'devenv.exe' should set the ERRORLEVEL accordingly. What does

devenv.exe <solution.sln> /Build "Debug|Win32"
echo %ERRORLEVEL%

yield in case of a success/failure?
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 86

Expert Comment

by:jkr
ID: 20104795
BTW, another option is to use the '/Out'  switch, e.g.

devenv.exe <solution.sln> /Build "Debug|Win32" /Out solution.log

Seel also

devenv.exe /?
0
 
LVL 2

Expert Comment

by:kmaicorp
ID: 20105798
Not sure if C++ have this, but I know C# under VS80 has pre/post build event that you can set in the project to have your own code executed after a successful build. This would make it so you dont have to look at the output log yourself before running a script.
0
 
LVL 4

Author Comment

by:jimstar
ID: 20115875
>> Regarding the build results, 'devenv.exe' should set the ERRORLEVEL ...

For some reason, when I launched devenv from certain batch files, it would execute in the background and let echo ERRORLEVEL execute immediately (while it was building). In other batch files, it waited until the build was finished. After playing around with them for a bit I got it to wait all the time until devenv is finished (not sure which change caused it to start working though...), thus I can now check the errorlevel fine.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

873 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