TFS 2010 - How about those Build delete options
When you delete a build in Visual Studio 2010, you don’t just get a message box that says “Are you Sure?.” You get this…
In 2010, you choose what you want to delete. You can delete any of the the following:
- Details – this is the database record itself. Deleting this causes the build not to show up any more in the Build Explorer. The record is actually still there, but it is marked as deleted.
- Drop – these are all the outputs of the build that were copied to some share. Typically this is the biggest part of the build (and the reason for this dialog). This is an easy way to clean up the outputs for a drop.
- Test Results – these are all the test results in Test Management that are associated with the build. You used to be able to do this from the Build Details View, but no one ever found it there :)
- Label – this is the version control label that was produced as part of the build. You may want to keep this forever, even if you decide to get rid of the rest of the objects.
- Symbols – If you are using Symbol and Source server, then you have symbol files stored on your Symbol server that may be taking up a lot of space. Again, if you released this build to customers you may want to keep these for debugging purposes.
A lot of options, I know. But the default is to delete everything, which is what you probably want if you actually decide to delete a build manually. Note that these same options are presented to you for Retention Policies. So, you will see a very similar dialog there.
So what does it really mean to delete the details of a build?
Deleting a build in 2010 is different than it used to be. In VS 2008, deleting a build removed it from the database completely (as well as deleting the drop and label). In 2010, it simply marks it deleted in the database so that it doesn’t show up in the UI anymore. To get rid of the build completely you have to Destroy it! This is similar to the notion of delete and destroy in TFS Version Control. You can learn more about the destroy command in Adam Root’s blog post.
So does this change in deletion change anything else. Perhaps, notice what happens in VS 2008 when you do the following:
- Kick off a manual build of definition “Foo”
- Build “Foo_22.214.171.124” is created
- You Delete build “Foo_126.96.36.199”
- Kick off a new manual build of definition “Foo”.
- Build “Foo_188.8.131.52” is created (The same build number is used)
In 2010, you would get a new build number in step 5. The real problem here is if you generate your own build numbers and expect the number to be reused. If so, you need to Destroy instead of deleting your builds.