Generating Custom TFS Check-in E-mails – Part 1

We do the vast majority of our development in Visual Studio 2005 and 2008, so when we were picking a new source code management tool last year, getting something that integrates nicely with Visual Studio was obviously a priority.

We had all worked with a relatively wide variety of tools in the past (Visual SourceSafe, ClearCase, CVS, Perforce, etc.) with most experiences being good (Visual SourceSafe being an obvious exception ;-) . We also wanted a nicely integrated solution with bug tracking, build management and so on. Given that we’re a pretty small team we wanted something that would be easy to maintain.

After having looked at a few alternatives, we decided to go with Microsoft’s Team Foundation Server mostly because it seemed to provide most of the features we wanted with a minimum of fuss.

We’re currently running TFS 2005, but will be upgrading to TFS 2008 in the not too distant future (meaning in the next 2 months or so).

In a previous job I worked on a project that used CVS for source code control (along with Ant and Maven to round things out), but the tool that really made a difference (especially considering that the developers on the project were scattered across the country) was CVSspam which sends out e-mails with highlighted code differences for every check-in (see an example here).

I found these e-mails to be an excellent way of getting an understanding of what was going on in the code base, not to mention that they worked as a (very) informal code-review. The standard TFS check-in notification e-mails leave quite a bit to be desired and although you can customize them by modifying the XSLT files, I couldn’t see any obvious way of replicating CVSspam using just XSLT so I decided to write my own tool (cleverly called TFS Spam) to accomplish this.

Over the next couple of posts I will detail how this tool was created and sometime later this summer we’re going to put the source code up on CodePlex just in case anyone else finds it useful. In the meantime, here’s a screen shot of one of our test check-in notifications:

Check-in Email

Leave a Reply