views:

492

answers:

3

I have a TFS Build Server where the CI and Release builds occur. The build process runs under some domain account and all the build activity happens under this user's temp directory. Unfortunately, the \Users directory is on the C: drive which turns out to have not much space. Although the build retention policy is quite strict, there are enough builds configured that this space has become quite scarce.

There are other volumes on the machine that have plenty of space.

Can anyone suggest a straightforward way to change the root build directory? I've looked for a TFS property without much success so far.

Thanks.

+1  A: 

My TFS proj files have a property called BuildDirectoryPath

<BuildDirectoryPath>c:\build</BuildDirectoryPath>

This is where all of my source code gets put and where the binaries are built.

Darrel Miller
+1  A: 

In Team Explorer View,

Right-click Builds -> Manage Build Agents,

Select the build agent and hit 'Edit...'

Set 'Working directory' to

<New Build Root>\$(BuildDefinitionPath)

This works for all projects using that build agent.

Nick Gunn
+2  A: 

For TFS 2008 right click on the Builds node and chose "Manage Build Agents". Select the agent of choice and then press "Edit..." and change the working directory. My personal preference is to change it to something like:

c:\bw\$(BuildDefinitionId)

As that will give it a short working folder for your builds (the .NET API's have a 260 character limit for file paths so using as few of those characters as possible for your working folder gives you mor eto play with during your build).

For TFS 2005 edit the TFSBuild.proj file of the relevant build(s) and change the working property to point to where you want it for each build.

Hope that helps,

Martin.

Martin Woodward