|
-
December 6th, 2004, 07:42 AM
#1
Batch Build multiple projects
I've got over 50 projects to build.
I've created a MasterBuild project, and added every project using "Insert project into workspace".
What is the easiest way to AUTOMATICALLY check whether any of the builds had ERRORs? I know I can visually inspect the build output, but even then I could miss the relevant information because of all the other output.
OR...
Is it preferable to use a series of NMAKEs in a BATCH file to build everything?
-
December 6th, 2004, 08:03 AM
#2
Re: Batch Build multiple projects
Do:- Goto {Project->Dependencies}
- Select your master-project from the combo-box, if not already selected,
- Check on all of the necessary projects, that you need to build when you build your master project.
Please be ensure, that you do not create multiple dependeicies on the projects, that are already set-dependent by other projects.
-
December 6th, 2004, 09:17 AM
#3
Re: Batch Build multiple projects
Ajay Vijay,
Thanks, that works.
OK I'm getting greedy now but I would appreciate any comments about this supplementary question (if anybody has time) ...
I want to run the MasterBuild every night automatically.
The build must do 2 things :-
(1) Attempt to build every project, and
(2) Report any projects that FAIL to build.
I know how to do (1), I just use the "Batch build" utility to tick off all the projects to be built. This will correctly attempt to build EVERY project, even if there are any errors in some projects.
Thanks to Ajay, I now also know how to do PART of (2), i.e. I can easily find out whether every project builds successfully, or if not, which is the first project to fail.
However, I would like to have the best of BOTH worlds.
Maybe the best solution is to perform BOTH kinds of build one after another, i.e. a MasterBuild project build which will stop as soon as an error is detected, then ALSO perform a batch build of every project in turn, which will build them all regardless of any failures that occur.
However, this kind of takes me back to my original question, which is...
Having performed a Batch build to build every project, what is the easiest way to find out which projects FAILED to build?
I think I might have answered my own question here, but I would still welcome any comments.
-
December 6th, 2004, 09:21 AM
#4
Re: Batch Build multiple projects
I do not use, but Macros (.DSM - Developer Studio Macros) may solve your problem. Please look at samples as well as online MSDN.
-
December 6th, 2004, 10:32 AM
#5
Re: Batch Build multiple projects
 Originally Posted by martin_craigen
However, this kind of takes me back to my original question, which is...
Having performed a Batch build to build every project, what is the easiest way to find out which projects FAILED to build?
try this simple batch file:
Code:
set VSDIR=C:\Program Files\Microsoft Visual Studio\VC98\Bin
call "%VSDIR%\vcvars32.bat"
for /F "usebackq tokens=1* delims=*" %%i in (`dir /b /S *.dsp`) do (
MSDev "%%i" /REBUILD /MAKE ALL & if errorlevel 1 ECHO Error building %%i >> error.log
)
-
December 6th, 2004, 11:23 AM
#6
Re: Batch Build multiple projects
AdaraCD,
Thanks, I can see how that will build everything and record errors in the log file.
So maybe it will be best to just run a BATCH file and check the "errorlevel" after every build.
However, I would still like to get up to as high a level as possible. Visual Studio provides good high-level build tools with nice, tick-box interfaces. I'd rather, if I can, stay up at this level, rather than go back down to DOS batch files.
Does ANYBODY do multiple project-builds in the VS Workspace, or is everyone using Batch files and NMAKE etc?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|