Here's another blog post that came from an attendee question at VSLive Vegas.
In Team Foundation Server (TFS) there are at least two places where you can see completed Team Builds: the "Team Builds - All Build Types" screen and the Bug work item's "Found in build" and "Resolved in build" drop-down lists.
Here's what it looks like on the All Build Types screen:
Here's what it looks like on the Bug work item.
These lists can get very, VERY long. On the All Build Types screen, it is not much more than an annoyance. When you have to look at the list in a drop-down list on a work item, it's a huge pain.
The question that I got at VSLive is "how do you delete builds from these lists?" (Hmmm. Good question. It certainly isn't obvious, is it?)
These values come from two different places. The All Build Types comes from the build system and the Bug drop-down lists come from a TFS Global List.
You can see where those values for the drop-down come from by opening up the Bug work item template and searching for "FoundIn".
Notice that the
Let's tackle the All Build Types first because it's easier.
To delete from the “All Build Types”:
- Figure out which build number you want to remove
- Go to the VS2005 command prompt
- Type in:
tfsbuild.exe delete name_of_tfs_server name_of_project “name of the build” - Hit enter
- Close the All Build Types window
- Re-open the window. The build should be gone.
Delete a build by editing a global list
Deleting from a global list is more involved. (Disclaimer: One way is to use the Process Template Editor but I find that it's generally a little buggy and I therefore don't trust it...but I'm also kind of a command-line guy and like to know the "Real" way to do stuff.)
Figure out which build number you want to remove
Go to the VS2005 command prompt
Type in:
glexport /f globallists.xml /t http://tfs_server_name:8080You’ll now have a file named globallists.xml. Make a backup copy of the file just in case you make a mistake.
Open globallists.xml in Notepad.
You should see about a zillion
’s. Find the that corresponds to your Team Project
(name="Builds - TeamProjectName") and delete the’s that you don’t want. Save globalists.xml.
On the command line, type in:
glimport /f globallist.xml /t http://tfs_server_name:8080Go to Team Explorer. Right-click the team project you just made the adjustment for and choose Refresh.
The build should now be gone from the drop down lists.
-Ben
-- Looking for Team Foundation Server (TFS) or Visual Studio Team System (VSTS) consulting, mentoring, installation, configuration, customization, or training? Contact me via http://www.benday.com.