TFS11 RC – Simple Build Summary Customization

So, I did a few posts when TFS 2010 released on how developers could customize the Visual Studio Build Details View. However, it required creating a VS Add-In or Package and then deploying that to all your clients. Well, with the RC release of TFS 11 and Visual Studio, there is a much easier way to add simple content to your Build Details Summary view.

Simply add the new activity “WriteCustomSummaryInformation” to your build process template (*.XAML). It has several properties that allow you create a new Section and add text to that section…

  • SectionKey – Specifies a unique identifier for the section.
  • SectionDisplayName – Specifies the name to display on the Build Details View.
  • SectionPriority – Specifies the relative priority of this section.
  • Message – This is the string that is displayed inside the section.

Here are some examples of WriteCustomSummaryInformation and what the XAML would look like in notepad…

<mtbwa:WriteCustomSummaryInformation SectionKey="NewSection" SectionDisplayName="My New Section" SectionPriority="75" Message="This is message 1” />
<mtbwa:WriteCustomSummaryInformation SectionKey="NewSection" SectionDisplayName="My New Section" SectionPriority="75" Message="This is message 2. Click [here](https://www.bing.com) to open Bing.com” />
<mtbwa:WriteCustomSummaryInformation SectionKey="NewSection" SectionDisplayName="My New Section" SectionPriority="75" Message="This is message 3. Click [here](vstfs:///WorkItemTracking/WorkItem/1) to open the first work item in this collection.” />

And here is how that would look on the Build Details View…

image

 

More Details….

Priorities: 0 is the highest priority for a section. The standard sections start at about 100 and continue in increments of 100 for the most part.

Adding to an existing section: You can find out the Key and priority of existing sections by hovering your mouse over them. Using that Key, you can add messages to the top of existing sections. You cannot remove existing sections but they will take on the priority that you provide. Thus, you could move them to the bottom by providing a very high priority.

Links: By using the syntax [text](link) you can embed hyperlinks into your messages. links that start with “vstfs:” are assumed to be valid TFS artifact links and will be evaluated that way. All other links will be passed to the OS for evaluation.

Customizing the old way: The 2010 way of customizing your Build Details View still works and provides a lot more customization than we have provided in this feature.

I hope this makes your customizations much easier and allows you do more with Build!

Happy Customizing!