With Visual Studio Team Build 2008 there is no way to run two builds from within the same Team Project at the same time, although two builds in different Team Projects can run in parallel.
Update: I got a few questions about this above statement and I'd like to clarify it since it is a little ambiguous.
- You cannot configure a single build agent to build more than one definition per team project in parallel in TFS 2008
- You can have two build agents building a definition each from the same team project
Just like with Team Build 2005 you can run builds in parallel if they are from different team projects.
This is often confused with a MSBuild 3.5 feature called “parallel builds”. This allows you to make better use of multi-processor/core machines, as MSBuild can scale-out across the available processing power.
Each MSBuild process (including the main or parent process started from command line) contains a component called the node. Projects are processed and built by the node component. Thus using “maxcpucount” of 2 will result in 2 MSBuild processes. If your projects have dependencies on other projects that are being built in parallel, then you will need to set appropriate project to project references so that dependent projects get built first.
Aaron Hallberg describes how Team Build is able to make use of the parallel builds feature, but it still doesn’t remove the limitation of one running build per team project.
Another common question is: What is the purpose of team Build Agents if you cannot use them to transparently scale out?
Obviously this is one of the goals for the future but there wasn’t enough time to get it into TFS2008.
The current April CTP of Rosario has the build controller / agent functionality implemented. When you queue a build, you queue it against a controller which manages a pool of agents. Take a look at Willy-Peter’s Team Build blog post on the Rosario April CTP for more information.