views:

609

answers:

4

When running a TFS build, will it always download all the files for the project, or can it use a previous builds download (as long as the files didn't change).

A: 

It should only ever download if you do a "Get Latest".

Every other build will do it locally.

footose
Not quite sure what you're trying to say here.
Ray Booysen
Why would TFS download all the files for the project everytime you build? It doesn't. If you do a "Get Latest" on the project, and force it, then it will get the files. The build will always be local.
footose
A: 

TFS keeps records of which versions of the files you have, so when you do a 'get' it only will bring over the files that have changed since your last 'get'. It's possible to override this behavior with the "/force" option, but it's rarely needed.

A: 

If you right click on the build in TFS2008 and do "Edit Build Deifnition..." then click on the Workspace tab you can control what is downloaded by the build to limit it to only what you need. See the following blog post I recently did on this topic:

http://www.woodwardweb.com/vsts/tfs_top_tip_16.html

Additionally, you can enable incremental gets in TFS if you would like by setting the following property in your TFSBuild.proj file.

true

That will then only download the files required each time.

Hope that helps,

Martin.

Martin Woodward
Might have to fix your formatting. I think some XML has been lost.
Ray Booysen
Hi Ray, thanks for your comment. Which formatting is not working for you, I'm having trouble tracking down the problem, apologies.
Martin Woodward
We can't see the property that is to be set to "true"
thijs
+2  A: 

TFS build (2008) will always get all sources specified in build configuration, recreate workspace and force get of sources before doing a build.

If you add

<PropertyGroup>
  <IncrementalBuild>true</IncrementalBuild>
</PropertyGroup>

to your [Build name].proj configuration file then it will do only incremental build and get only changed files. It skips cleaning the files, initializing the workspace and force get steps.

more info: http://msdn.microsoft.com/en-us/library/aa833876.aspx

Perica Zivkovic