How can I listen to TFS Events (without building everything from scratch)?

By | 2007-11-12T16:17:10+00:00 November 12th, 2007|Visual Studio Team System|3 Comments

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):

  • AclChangedEvent
  • Branchmovedevent
  • BuildCompletionEvent
  • BuildStatusChangeEvent
  • CommonStructureChangedEvent
  • DataChangedEvent
  • IdentityChangedEvent
  • IdentityCreatedEvent
  • IdentityDeletedEvent
  • MembershipChangedEvent
  • WorkItemChangedEvent

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!

About the Author:

3 Comments

  1. hinshelm November 13, 2007 at 3:52 pm

    The TFS Event Handler actualy borrows from Howard’s work. I was too lazy to write the object code for the events…Thanks Howard.

  2. Tester Center at MSDN November 14, 2007 at 8:29 am

    […] point out effective ways to do things with readily available Team System tools and widgets, such as How can I listen to TFS Events (without building everything from scratch)?  Other times, they will expose lessons we’ve learned over the course of working with TFS, […]

  3. Team System News : VSTS Links - 11/15/2007 November 15, 2007 at 5:19 am

    […] Steven Borg on How can I listen to TFS Events (without building everything from scratch)? […]

Leave A Comment