1

I want to write a plugin or service that should trigger/call an event on each check-in (TFS). I want this plugin to be deployed on specific client machines only.

I have written a plugin at TFS level, but I want to write one that will work at client side.

Scenario:

Users (U1, U2, U3, U4). I want plugin to be deployed in U1, U2 and U3 machine. When U1, U2 or U3 check-ins a file, I want to call an event (or web page or some other file).

This event must not be triggered when U4 checks-in any file.

Any thoughts?

Sunil Agarwal
  • 4,097
  • 5
  • 44
  • 80

1 Answers1

1

You want to write a Checkin Policy. This is deployed into Visual Studio and triggers as part of a checkin. There are a number of polies out of the box and you can do whatever you like in a policy.

You can inherit from ICheckinPolicy.

  • Kind of check-in policy. I have implemented check-in policy at TFS level. No issues faced there. But what I want is something like check-in policy validation at client side (if user installs the plugin check-in policy will work for him). Can I create a plugin/trigger at client level? – Sunil Agarwal Oct 01 '14 at 16:46
  • CheckIn Policies are only validated client side. There is no server side checkin-policy validation. – MrHinsh - Martin Hinshelwood Oct 01 '14 at 19:43
  • Agree. But my requirement is to deploy the plugin on client server. Can we achieve this? – Sunil Agarwal Oct 04 '14 at 05:58
  • What do you mean by "client server"? Checkin policies are run on the VS Clinet, ISubscriber events are run on TFS. – MrHinsh - Martin Hinshelwood Oct 05 '14 at 07:23
  • Correct. I want to call an event in user (client) machine for check-in. TFS I am accessing is located somewhere in US. I want to write a code which I can deploy on my machine which will trigger when i perform a check-in. – Sunil Agarwal Oct 05 '14 at 07:31
  • But not a CheckIn Policy. You probably want a SOAP event then. I have code for this on Codeplex: http://tfseventhandler.codeplex.com/ – MrHinsh - Martin Hinshelwood Oct 06 '14 at 13:08
  • I still believe that you want a check-in policy. These policies are only ever deployed on the client and trigger when you try to checkin. If you want to call something after you checkin you should go the SOAP route. – MrHinsh - Martin Hinshelwood Oct 07 '14 at 12:33