Search code examples
tfsvisual-studio-2013continuous-integrationincremental-build

Customize TFS Build to include only specific files


I have a solution file with multiple projects that I am trying to configure for continuous integration on a development server using Team Foundation Server. I would like to customize this to only deploy the changes that were checked in.

Scenario example

  • Projects
    • My Project (MVC app)
    • Logic Layer

A user checks in a new Home.cshtml file and updates a code file in the Logic Layer. I would like to configure the automated build to just build the following package:

  • My Project
    • bin/MyLogic.dll
    • Views/Home.cshtml

What steps are done to achieve this scenario?


Solution

  • You want an incremental build, though I don't recall if it was supported back in TFS 2010.

    Try configuring the build to not clean the workspace. Set the "Clean Workspace" property in the "Basic" section to "None".

    Then, it will keep the binaries from the previous build, and, just like Visual Studio, will only build targets for which the inputs have changed.