I’ll be the first to admit, creating a TFS listener from scratch is a pain. The work isn’t creative work, and you spend the majority of time creating plumbing. So, what can you do. There are two approaches I see right now (leave a comment if I’ve missed your favorite).
1. Use Howard van Rooijen’s VS2005 template. Basically Howard’s put together a Visual Studio 2005 project template that allows you to create a new web site that’s already set up to listen to all of the important TFS events. It currently handles the following events (which are all of the ones that are not deprecated as of VS2005 SP1):
It not only creates the appropriate SOAP endpoing, but also creates the necessary XML Schema so you can deserialize the event data into an object that you can work with directly. Very, very nice. I’ve used it several times, and recommend it highly. (Does anyone know if there’s a VS2008 version out there yet? Howard?)
2. Use the TFS Event Handler hosted on CodePlex. I haven’t used this tool yet, but it looks useful. Basically, you don’t use it to write your own event handler, rather you allow it to catch all the events from TFS and send them to you using an MSMQ channel (created in WCF). It looks very promising! The project is managed by Martin Hinshelwood (blog), and has an initial release available. (Update: Martin Hinshelwood notes in the comments that he borrowed the objecs from Martin. That makes these two tools related! Thanks for all your hard work, both of you!)
Leave a comment if you’ve used either of these tools!