Click here to Skip to main content
12,943,299 members (71,987 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 17 Mar 2013

Perform a custom action for Check-in event in Microsoft Team Foundation Server

, 17 Mar 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
Perform a custom action for Check-in event in Microsoft Team Foundation Server.


Microsoft Team Foundation Server is a very powerful and customizable tool user of version control. TFS 2005 is less stable when compared to TFS 2008.


Now I just faced a legitimate requirement..

When someone checks-in any file to the TFS, I need to get the list of files checked-in and perform a custom action based on that file(s) list. How do I do that??  I just need to extend the Microsoft TFS services. 

Using the code

TFS is nothing but a SQL Server database(s) and a Share Point Web Service. All actions to the TFS are done by calling webservices at http://yourservername:8080/…asmx. So what you need to do is listen for a particular event and then catch it and execute your code. 


You can find the BisSubscribe.exe at –> C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup\.

TFS has a small interesting utility called BisSubscribe.exe, you can use this tool to subscribe to quite a few events in TFS. So, now i want to subscribe to the TFS Checkin-Event, and the command goes like this:

BisSubscribe.exe /server tfsserver01 /eventType CheckinEvent /deliveryType Email /address

This will create a subscription on the tfsserver01 server for CheckIn event and a email will be sent to, but this does not serve my requirement. I need a list of files checked-in the moment it is checked in. So, i just tweak the command like this.

BisSubscribe.exe /server tfsserver01 /eventType CheckinEvent /deliveryType Soap /address http://myserver:81/service.asmx

This command will create a subscription on tfsserver01 server for Checkin event and will invoke the Notify() method in the service.asmx webservice which i developed and published in http://myserver:81/

The webservice will have the Notify command with the following signature:

[SoapDocumentMethod(Action = "http://Microsoft.VisualStudio.Bis/Notify", 
         RequestNamespace = http://Microsoft.VisualStudio.Bis)] 
public void Notify(string eventXml) 
     //Write your custom code here 
     //Use eventXml to extract event related fields and their values 

The signature of the Notify function should be same as above.

Happy programming….. Enjoy.. 


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Vinu Baby Pannikot
Web Developer
India India
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170518.1 | Last Updated 17 Mar 2013
Article Copyright 2013 by Vinu Baby Pannikot
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid