Build Retention Policy and Deleted Version Labels<p align=left><font face=Arial size=2></font> </p> <p>Thanks in advance, everyone.</p> <p align=left> </p> <p align=left>I have the retention policy in my builds to only keep the last two good builds, and that's fine.  However, when I used the Label Sidekick to view a baseline (version label) from many builds ago, that's when I realized that all my prior build labels are no longer on the code, and only the last two build labels still exist.</p> <p align=left> </p> <p align=left>How can I set up TFS so that I keep my build retention policy to only keep the last two good builds, and leave <strong>all</strong> the build version labels that are applied?</p> <p align=left> </p> <p align=left>I suppose I could add a target to the build script that'll assign a new label to the current build label, and that may work. But more importantly, I'd like to understand the connection between build version labels and the retention policy.</p> <p align=left> </p> <p align=left>Thanks.</p>© 2009 Microsoft Corporation. All rights reserved.Thu, 09 Oct 2008 21:22:14 Za08bf751-4693-4af3-8d14-c74a34f78fe5http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/a08bf751-4693-4af3-8d14-c74a34f78fe5#a08bf751-4693-4af3-8d14-c74a34f78fe5http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/a08bf751-4693-4af3-8d14-c74a34f78fe5#a08bf751-4693-4af3-8d14-c74a34f78fe5HATLANTAhttp://social.msdn.microsoft.com/Profile/en-US/?user=HATLANTABuild Retention Policy and Deleted Version Labels<p align=left><font face=Arial size=2></font> </p> <p>Thanks in advance, everyone.</p> <p align=left> </p> <p align=left>I have the retention policy in my builds to only keep the last two good builds, and that's fine.  However, when I used the Label Sidekick to view a baseline (version label) from many builds ago, that's when I realized that all my prior build labels are no longer on the code, and only the last two build labels still exist.</p> <p align=left> </p> <p align=left>How can I set up TFS so that I keep my build retention policy to only keep the last two good builds, and leave <strong>all</strong> the build version labels that are applied?</p> <p align=left> </p> <p align=left>I suppose I could add a target to the build script that'll assign a new label to the current build label, and that may work. But more importantly, I'd like to understand the connection between build version labels and the retention policy.</p> <p align=left> </p> <p align=left>Thanks.</p>Thu, 25 Sep 2008 15:31:49 Z2008-09-30T12:48:00Zhttp://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/a08bf751-4693-4af3-8d14-c74a34f78fe5#36f6a9eb-375a-466b-8227-0f3d9cde4d41http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/a08bf751-4693-4af3-8d14-c74a34f78fe5#36f6a9eb-375a-466b-8227-0f3d9cde4d41Bill.Wanghttp://social.msdn.microsoft.com/Profile/en-US/?user=Bill.WangBuild Retention Policy and Deleted Version Labels<p align=left><font face=Arial size=2>Hi</font></p> <p align=left></p> <p style="font-size:11pt;margin:0in;font-family:Calibri">Build retention policy works by deleting old builds. When a build is deleted, the associated label is deleted too. </p> <p style="font-size:11pt;margin:0in;font-family:Calibri"> </p> <p style="font-size:11pt;margin:0in;font-family:Calibri">When retention policy is set, we generally use changeset to track the source code. One of the best practice is adding changeset as part of the assembly version number. When a issue is reported against a particular version, you can extract the changeset number and track back to source code. </p> <p style="font-size:11pt;margin:0in;font-family:Calibri"> </p> <p style="font-size:11pt;margin:0in;font-family:Calibri">For how to set changeset as part of assembly version, see <a title="http://richardsbraindump.blogspot.com/2007/07/versioning-builds-with-tfs-and-msbuild.html" href="http://richardsbraindump.blogspot.com/2007/07/versioning-builds-with-tfs-and-msbuild.html">this blog</a>.</p>Mon, 29 Sep 2008 02:58:34 Z2008-09-29T02:58:34Zhttp://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/a08bf751-4693-4af3-8d14-c74a34f78fe5#1f9c8c97-1b50-46fe-8e78-2954294b2709http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/a08bf751-4693-4af3-8d14-c74a34f78fe5#1f9c8c97-1b50-46fe-8e78-2954294b2709Jason Prickett - MSFThttp://social.msdn.microsoft.com/Profile/en-US/?user=Jason%20Prickett%20-%20MSFTBuild Retention Policy and Deleted Version Labels<p>Bill is right. That is our default behavior. However, in SP1 we added the ability to keep your labels. Here is how:</p> <p align=left> </p> <p align=left>The build admin can add a flag to the Web.config file on the Application Tier to specify that labels should not be deleted. Here is an example of what that line in the web.config file would look like: <br>&lt;add key=&quot;PreserveLabelsOnBuildDeletion&quot; value=&quot;True&quot;/&gt; </p> <p align=left> </p> <p align=left>You may need to restart IIS to force the use of the new Web.config.</p> <p align=left><br>When this value is present, labels are not deleted from Source Control. The default behavior is still the same as RTM; labels get deleted with their corresponding builds.</p> <p align=left> </p> <p align=left>Hope that helps,</p> <p align=left>Jason</p> <p align=left><font face=Arial size=2></font> </p>Tue, 30 Sep 2008 12:47:05 Z2008-09-30T12:48:00Z