Writing the TFS job
So, as mentioned, we are going to need a class that inherits from ITeamFoundationJobExtension
.
Let's create a class called TfsCommentsToChangeSetLinksJob
and inherit from ITeamFoundationJobExtension
. As part of this, we will need to implement the Run
method, which is part of an interface, like this:
public class TfsCommentsToChangeSetLinksJob : ITeamFoundationJobExtension { public TeamFoundationJobExecutionResult Run( TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, out string resultMessage) { throw new NotImplementedException(); } }
Then, we also add the using
statement:
using Microsoft.TeamFoundation.Framework.Server;
Now, for this specific extension, we'll need to add references to the following:
Microsoft.TeamFoundation.Client.dll
Microsoft.TeamFoundation.VersionControl.Client.dll
Microsoft.TeamFoundation.WorkItemTracking.Client.dll
All of these can be found in C:\Program Files\Microsoft...