Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the location of the TFS Build

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.

like image 460
Nick Gunn Avatar asked Mar 24 '09 03:03

Nick Gunn


3 Answers

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.

like image 172
Martin Woodward Avatar answered Nov 13 '22 21:11

Martin Woodward


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.

like image 24
Nick Gunn Avatar answered Nov 13 '22 21:11

Nick Gunn


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.

like image 1
Darrel Miller Avatar answered Nov 13 '22 20:11

Darrel Miller