Using TFS 2012 Team Build to control build order of multiple solutions

Nitish Nagpal brings us this support experience today…. 


Problem Description

  • TFS 2012 with multiple C# solutions.
  • One solution depended on the .DLLs from other solutions.
  • Continuous Integration build definitions had been created for each solution.
  • When a solution containing a shared .DLL was modified, the goal was to run the build for the .DLL solution first, and then to run the build for the solution which uses the .DLL.

When the main solution is modified, the customer did not want to rebuild the .DLL solutions, as this took a lot of time.


The goal was:

– Set the build order between the build definitions so when a .DLL solution was modified it would be built first and then the solution dependent on it would build


– Propose an alternate solution to organize the solutions so that when a project is modified only the projects dependent on it will be rebuilt




We don’t have a feature that allows one build definition to be triggered from another at this time. Recommended workaround:

  1. Create one build definition to build everything
  2. Have that definition triggered by check-ins in any of the solutions (this should happen by default if the trigger type is Continuous Integration)
  3. Change the build to an incremental build (set CleanWorkspace to None). This will speed up the build times by only building what has changed.
  4. Tag one of the build agents so that it is the only one used for these builds. It is important that the same build agent or set of agents is used for the builds if incremental builds are to work.
Comments (1)