MS Visual Studio command line building

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?
LVL 4
jimstarAsked:
Who is Participating?
 
jkrCommented:
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
 
jkrCommented:
You can just open BuildLog.htm in the project's output directory.
0
 
jimstarAuthor Commented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
jkrCommented:
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
 
kmaicorpCommented:
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
 
jimstarAuthor Commented:
>> 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.