I'm currently using Nant with some exec tasks to compile some Visual C++ projects directly (through devenv). Because of how things are, I want to compile the projects, not the solution.
I could set up something along these lines (I know this is not correct syntax, but it should help explain the point): <?xml version="1.0"?> <project name="Hello World" default="build" basedir="."> <target name="debug"> <exec program="devenv" commandline="project1.vcproj /b debug"/> <exec program="devenv" commandline="project2.vcproj /b debug"/> <exec program="devenv" commandline="project3.vcproj /b debug"/> <exec program="devenv" commandline="project4.vcproj /b debug"/> </target> </project> </xml> Of course, I also want to compile the projects in release mode (and in several other configurations). What's the best way to do that without having to duplicate all the project names again? Ideally, I would like something like with make files: <?xml version="1.0"?> <project name="Hello World" default="build" basedir="."> <list name="projects"> <item>project1</item> <item>project2</item> <item>project3</item> <item>project4</item> </list> <target name="debug" foreach="projects"> <exec program="devenv" commandline="$1.vcproj /b debug"/> </target> <target name="release" foreach="projects"> <exec program="devenv" commandline="$1.vcproj /b release"/> </target> </project> </xml> Is something like that possible? I know about the trick of putting debug into a variable and having the "build" target use it, but that means that Nant won't build both debug and release without deleting the object files first. I'm sure it has to be something simple, but I haven't been able to find anything like that in the documentation. Thanks. --Noel Games from Within http://www.gamesfromwithin.com ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users