Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6864497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:55:08+00:00 2026-05-27T02:55:08+00:00

This is a follow up question from Team Foundation Server: Getting the Changeset Id

  • 0

This is a follow up question from Team Foundation Server: Getting the Changeset Id from PolicyBase object

I would like to run some code when I check-in occurs. The answer in the linked question above pointed me at this page on MSDN.

I didn’t fully understand the explanation on the page and I’m not sure where the check-in event handler would be run.

Should this be in an application that is run on every client machine or is this something that needs to be run on the actual TFS server?

I need to make sure the check-in event handler code is run for every check-in regardless of which client made the check-in.

I tried downloading the sample code available on that Microsoft page but it does not work.
I can connect to the TFS Server. When I click on the “Get List of Registered Events” button, the left hand list box populates with 13 items all with the name

Microsoft.TeamFoundation.Server.RegistrationEntry

As soon as I click on one of the items, I get a TypeLoadException with the message

Could not load type ‘Microsoft.TeamFoundation.Server.Subscription’ from assembly ‘Microsoft.TeamFoundation, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’

(Strangely it seems like this is referencing the VS2010 version of the assembly even though it is the VS2008 version that I have linked to the project).

What am I doing wrong here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:55:09+00:00Added an answer on May 27, 2026 at 2:55 am

    Library References

    I always found it a pain to try use the TFS2008 libraries instead of the 2010 ones once they were installed. You may be able to change the reference to use a specific version of the DLL, however there shouldn’t be any hard using the TFS2010 ones instead as they are backwards compatible.

    Event Subscriptions

    For TFS2010 it’s easiest to drop a custom DLL in c:\Program Files\Microsoft Team Foundation Server 2010\Application Tier\Web Services\bin\Plugins these are fairly simple to write and just involve implementing ISubscriber for CheckinNotification.

    Example Code
    http://embeddedworkitems.codeplex.com/SourceControl/changeset/view/2611#97271
    

    For TFS2008, or if you like in TFS2010, you need to use the SOAP webservices (or the bisubscribe.exe tool) to subscribe to events and have a webservice yourself for tfs to push events to. This is a much harder way to subscribe to events so if you can use the Plugin method instead I would recommend it (Although it can be more robust and is better for load distribution).

    VSTS Subscription FAQ http://blogs.msdn.com/b/narend/archive/2006/07/27/679571.aspx
    Subscribing without a Client SOAP Service http://blogs.msdn.com/b/mrod/archive/2006/09/18/761174.aspx
    

    TFS Deployer is a open source project that runs as a windows service and receives event notifications via the SOAP service. It contains a library (which may be reusable) that appears to have some code in it for receiving checkin events

    http://tfsdeployer.codeplex.com/SourceControl/changeset/view/57852#2395
    

    Using subscriptions you only need one copy of the application picking up events and handling them, it can be on the TFS server (has to be if you are using the plugin method) but can be on another machine when using SOAP subscriptions.

    Check-in Policies an Alternative Answer?

    Depending on exactly what you’re coding, you may be able to write a check-in policy instead. This needs to be installed on all client machines and won’t be supported by all the different clients (eg eclipse) but it may suit your needs. The example I gave earlier of the tool to support embedded workitem codes in checkin comments also comes with a check-in policy to perform other checks

    http://embeddedworkitems.codeplex.com/SourceControl/changeset/view/2611#97267
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

OK, this question is actually a follow-up question from my previous one: What would
This is a follow-on question from the one I asked here . Can constraints
This is a follow-up to my question from yesterday . I have Scott Meyers'
This is a follow on question to How do I delete 1 file from
This is a follow up from a question of mine that was just answered
This is a follow-on from this question, in which I was trying to suppress
This is a follow on from my previous question although this is about something
This question is a follow-up from How to indicate that a method was unsuccessful
This question is a follow on from this one ... I am binding to
This is a follow up question from Problem with array assignment I now have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.