.NET Zone is brought to you in partnership with:

Juri Strumpflohner mainly operates in the web sector developing rich applications with HTML5 and JavaScript. Beside having a Java background and developing Android applications he currently works as a software architect mainly dealing with the .Net technology stack. When he’s not coding or blogging about his newest discoveries he is practicing Yoseikan Budo where he owns a 2nd DAN. Juri is a DZone MVB and is not an employee of DZone and has posted 50 posts at DZone. You can read more from them at their website. View Full User Profile

HowTo: Subscribe to Failed TFS Builds

12.01.2012
| 4544 views |
  • submit to reddit

When you use a build server it is a must to get notified in case of build failures. Microsoft’s Team Foundation server has different possibilities to achieve this: using the Build Notification Tool or through so-called Alerts.

One of the prerequisites is the installation of the latest Team Foundation Power tools. You should find them easily by just googling.

Build Notification Tool

The build notification tool is a rather small windows tool that lets you subscribe to your different TFS builds.

You then get notified with IM messenger like notifications.

The tool is very beta however. Most often it has quite some delays in the notifications and there are a couple of bugs in the subscription dialog. The little red/green icon in the taskbar immediately notifies you about any problems in your builds.

TFS Alerts

Another possibility is to use the TFS alerts to get notified via email. Normally you can just right-click on the project of your team project and open the project alerts dialog.

There you can register yourself for any build quality change. That might just work fine for you. However, if you’d like to get notified only for failing builds then you have to define a separate alert definition.

Create Failed Build Alert Definition

Note: So far I’ve not found a way to achieve this in VS2012.

To create a custom alert definition for only failing builds you have to open VS2010 (with installed TFS power tools) and go to the menu Team > Alerts Explorer.

That should open the Alerts Explorer view where you can see all of the defined alerts.

Click on the “New Alert” button in the toolbar.

Then define the condition for being notified. For instance

Save it and it should work then.

Published at DZone with permission of Juri Strumpflohner, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)