1
votes

In TFS 2010/2015, the Xaml builds can be configured to only ever keep the last x builds (e.g. keep the last 5 builds).

Xaml Build Retention Policies

However, the new style builds in 2015 change how this works, to keep builds for x number of days, and keep a minimum of y.

vNext Build Retention Policy

This might work well when dealing with small projects, but the output of our build is >5GB a time.

Is there a way to use the old retention policy, or alternatively have TFS manually delete the old builds as new ones are created?

1

1 Answers

0
votes

XAML and vNext are totally two different build system. You definitely couldn't use the old retention policy on XAML build for vNext.

And there is also not any option to make TFS delete the old builds as new ones are created. Retention policies is the only way used to configure how long builds and releases are to be retained by the system for now.

As a workaround, you could use TFS API to do this. You could run a utility to clean the build artifact drop location for builds. Here is a sample from skundu's answer in this question: TFS 2015 - Delete Build Artifacts for your reference.