Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reference TFS work item from code comment

In Visual Studio (2012+) I want a clickable reference from a code comment to a TFS work item. Is there a simple way to do this, and is this also possible from comments within the body of a function (not being the summary of the function)?

So I want something like this:

/// <summary>
/// Example of a summary
/// </summary>
static void Main()
{
    int dummy = 1; //Should be 1 according to @Task1234 <- should be a hyperlink
}

And rather not something like this:

/// <summary>
/// Example of a summary, see <a href="http://mytfsserver:8080//tfs/myCollection/Branch/_workItems#id=1234"> Task 1234 </a>.
/// </summary>
static void Main()
{
}

Some tag reading material: Recommended Tags for Documentation Comments (C# Programming Guide)

like image 932
Michel van Engelen Avatar asked Aug 19 '14 08:08

Michel van Engelen


1 Answers

No, that isn't possible - not without writing an addin that pre-parses the page looking for likely links.

I know there was an addin like this for FogBugz (and other bug/workitem tracking systems), but I've not seen one specifically for TFS (although that doesn't mean one doesn't exist).

like image 99
slugster Avatar answered Oct 17 '22 18:10

slugster