Welcome to TFS Productivity Tools project
This article was written
as part of a job at
Experis.
Summary
The TFS Productivity Tools project was designed to provide TFS administrators with helper tools when doing Source Control or Work Item Tracking tasks.
For running these extensions the installation of VSTS 2010 Professional is required.
VisualStudio Extensions
|
Extension binary/source
|
Description
|
Runs from Visual Studio Window
|
| ChangeLinkTypes.vsix |
Modify Work Item link types. |
Team Explorer |
| DestroyWorkItems.vsix |
Completely destroy Work Items. |
Query Results |
| Export2Word.vsix |
Export Work Items to Microsoft Word document. |
Team Explorer |
ExtendedMerge.vsix
ExtendedMerge2012.vsix |
Provide workaround for several merge features not implemented by TFS 2010/2012:
- TFS merge leads to bulk check-in operation that puts files from all previous changesets into one big merge changeset.
- TFS allows only for consecutive changesets being cherry-peeked by merge operation.
- TFS doesn’t allow choosing changesets for cherry-peek merge by selecting work items.
- TFS merge dialog doesn’t have “force” and “baseless” options.
|
Source Control Explorer,
Query Results |
| GetPreview.vsix |
Emulate commandline task and write outputs to Output window:
tf.exe get /recursive /preview "itemspec" |
Source Control Explorer |
ModifyCheckinTime.vsix
[under development] |
1. Update modification time for checked-out files to their latest check-in time.
2. Directly modify changeset's check-in time in TFS database. |
Source Control Explorer,
History |
Custom WorkItem tracking controls
|
Extension binary/source
|
Description
|
WITDataGridView.dll
[under development] |
Envelope for standard WindowsForms.DataGridView control.
This control serializes table data to XML format and saves it as an WorkItem attachment with default file size limit of 2Mb. |
Custom Build workflow activities
|
Extension binary/source
|
Description
|
QueueNewBuild.dll
[under development] |
Contains activities - QueueNewBuild, QueueNewBuildBegin, QueueNewBuildEnd.
It works like LoadAndInvokeWorkflow but is intended exclusively for build workflows. QueueNewBuildBegin when put inside ParallelSequence can run builds simultanously in separate threads based on free build Agents. |
Installation
For installing anyone of the extensions double-click on VSIX file and follow the installer instructions.

ChangeLinkTypes
This extension modifies link types between the Work Items returned from Work Item query.
To execute it select any query under Work Items node in Team Explorer window and click on
"Change Query Link Types"

After that, in next dialog choose original and new wanted link types.

DestroyWorkItems
This extension completely destroys (not closes) Work Items returned from Work Item query.
To execute it select a number of Work Items in Query Results window and click on
"Destroy Work Items"

Export2Word
This extension exports Work Items returned from Work Item query to Microsoft Word document in paragraph style.
To execute it select any query under Work Items node in Team Explorer window and click on
"Export to Microsoft Word"

Exported document sample
[TODO]
ExtendedMerge
Extended Merge extension provides workaround for several merge features not implemented by TFS:
- TFS merge leads to bulk check-in operation that puts files from all previous changesets into one big merge changeset.
- TFS allows only for consecutive changesets being cherry-peeked by merge operation.
- TFS doesn’t allow choosing changesets for cherry-peek merge by selecting work items.
- TFS merge dialog doesn’t have “force” and “baseless” options.
Initializing ExtendedMerge extension
The list of merge candidates can be obtained in two ways:
- From Source Control Explorer window.
In this case all history changesets for a specific server path are parsed.
- From Query Results window.
In this case all changesets, linked to the selected Work Items are parsed.
After initialization stage extension opens Visual Studio tool window pane with a grid that shows useful information about parsed changesets:
- Checked/unchecked status.
- Work item ID.
- Changeset ID.
- Changeset check-in date
- Changeset creator.
- The change types this changeset contains.
- Possible merge options
- None – merge is impossible (don’t mess with “discard” commandline option)
- Baseless – baseless merge
- Force – force merge
- Candidate – regular merge
- Merge source path (can be modified).
- Changeset comment field.

The Merge Target Location field contains the path to a folder or a branch in source control.
Merge types are calculated based on shared Merge Target Location path and an individual changeset Source Path.
Running ExtendedMerge extension
Extension runs all actions from toolbar buttons (some of them are duplicated on grid context menu also).

|
Menu item name
|
Menu item description
|
| Link to Work Items |
When checking in merge results link new changesets to work items the same way as they were linked in original changesets. |
| Normal Merge |
Do regular merge based on merge candidates. |
| Conservative Merge |
Use “Conservative” merge option. It produces more merge conflicts. |
| Refresh |
Refill changeset merge types. |
| Merge |
Do merge. |
| Resolve |
Show merge conflicts. |
| Changeset details |
Show changeset details. |
| Work Item details |
Show Work Item details. |
| Navigate to Server Path |
Navigate to server path in Source Control Explorer. |
| Edit Server Path |
Edit server paths (one or multiple). |
| Copy to Clipboard |
Copy selected changeset details to clipboard. |
| Mark All Items |
Check all grid items. |
| Unmark All Items |
Uncheck all grid items. |
Resolving merge conflicts
During merge operation merge conflicts can occur.
In this case click on OK button and resolve conflicts with standard TFS Resolve Conflicts dialog.


GetPreview
This extension emulates TFS commandline operation: tf.exe get /recursive /preview "itemspec"
To execute it select a path in Source Control Explorer window and click on
"Emulate Get-Preview".
The results are print to Output window.

ModifyCheckinTime
[This extension is currently under development]
This extension consists from 2 parts:
- Updates modification time for checked-out files to their latest check-in time.
It is accessible from Source Control window & History window. - Directly modifies changeset's check-in time in TFS database.
It actually runs SQL statement: UPDATE tbl_Changeset SET CreationDate=’?’ WHERE ChangeSetId=‘?’
It is accessible from History window.


Release Notes
- The ExtendedMerge uses a number of internal Microsoft classes. It can possibly lead to some tool malfunction in the next TFS versions:
|
Feature
|
Classes
|
| Show browse server folder dialog |
Microsoft.TeamFoundation.Build.Controls.VersionControlHelper.ShowServerFolderBrowser |
| Show merge progress dialog |
Microsoft.TeamFoundation.VersionControl.Controls.ProgressMerge |
| Show resolve conflicts dialog |
Microsoft.TeamFoundation.Client.Arguments
Microsoft.TeamFoundation.VersionControl.CommandLine.CommandResolve |
- The GetPreview uses environment variable: %VS100COMNTOOLS%
- Extension packages used icons from GNOME project:
http://art.gnome.org/themes/icon