30 August 2008

You can be alerted of failed builds in Team Foundation Server 2008

In Team Foundation Server 2008 you can configure a project alert that sends an alert to your email address when a build completes. This is a very useful if a build fails, but if you enabled continuous integration your inbox will probably contain many alerts of successful builds. The out-of-the-box functionality for configuring alerts is very limited, but luckily Microsoft has released Visual Studio Team System 2008 Team Foundation Server Power Tools which is an add-on to Visual Studio 2008.
One of the tools in this package is called Alert Editor, and it lets you subscribe to build faults in a few simple steps:
  1. Select “Alerts Editor…” from the “Team” menu.
  2. Click “New” on the toolbar to create a new alert.
  3. Select “Failed builds” from the “Build Alerts” sub group, and click OK.
    New Alert
  4. You might have to enter you e-mail address in the Send To field if Team Foundation Server can’t resolve your name.Alert Editor
    This alert has a filter that only sends an alert if StatusCode is not Succeded. If you already has an alert, you can add this clause to your existing alert definition.
  5. Select another alert or close the window to save the changes before testing the alert.
As you see in the previous window, the Alerts Editor is very powerful and you have much more control over your alerts than by only using the standard functionality in Team Foundation Server.

Update: Thanks to TerrenceJ in my comments for recommending an improved filter.


  1. The Power Tools Alerts Editor is great as you say. I found it a better strategy to use the expression (StatusCode <> Succeeded). If your Build Passes but your Unit Tests fail, the Status Code will be Partially Succeeded. Only checking for failed will miss this.

  2. Thanks for taking the time to post a comment. You're completely right and I agree that your expression is better, and I've updated my post to reflect your suggestion.

  3. This comment has been removed by the author.

  4. Just a quick note: this is not yet available in TFS 2010 Beta 2. All other alert types are ok, except Build alerts.

  5. Thanks for commenting. The only notification option with Beta 2 is to subscribe to all build notifications, but this gets pretty annoying on my CI builds :P I'm pretty sure Microsoft will fix this before RTM though.