5
votes

Is there a way to create a build definition, in TFS 2010, that uses continuous integration trigger, and only builds the project who's code changed.

To clarify, what I'm searching for is the following scenario:

1 Solution

x Projects in Solution

1 Build Definition per Project

All Builds are CI triggered

When a check-in occours in a project only that project gets built and tested.

2
This is not an answer, but a related piece of knowledge separating MSBuild vs. Visual Studio Build items. How it applies to your question, it seems MSBuild step is the appropriate way to target a csproj for builds that exclude other projects. CI can then be scoped to the folder that contains the proj. Works for me.one.beat.consumer

2 Answers

4
votes

Place in your build definition's "Items to build" section of the "Process" tab any *.*proj instead of a *.sln.
In the "Workspace" section, select only the source control paths that relate with this project.

4
votes

In the process tab, set "Clean Workspace" to "None", use "/t:Build" on the "MSBuild Arguments" and properly configure your projects and their dependencies in the solution. This way on each build, you will be getting the latest code, and then building whatever was modified, and anything that depends on it. This is much more dynamic and requires only one build definition. Let the build system operate as it was designed and leverage the optimized build process.