How do I make custom comment tokens? - visual-studio-2010

According to this, VS 2008 and 2010 had a feature called Comment Tokens. You can write // TODO document this magic number here and it will appear in your Comments section of the Task List. This part works for me.
However, that article says that you can even define your own tokens, by going to Tools>Options>Environment>Task List .
However, in my Visual Studio 2010 Ultimate, I don't have that option.
How do I make custom comment tokens?

Just check the "Show all settings" checkbox you see at the bottom left of the Options dialog. You now should be able to navigate to "Environment | Task List" to create your custom comments. Here is an additional link How to: Create Custom Comment Tokens

Related

Is there any way in Visual Studio to prefix comment while commiting?

From the screenshot below
I want to prefix my comment to the changes including work item's id. So I expect to get this:
TFS - 123: Want to prefix this comment with work item's id
Currently I need to enter work item's id in both places in Comment and Related Work Items sections which is borring. What I want is just pass them into one place (Related Work Items section) and when I click Check In Visual studio will automatically prefix my comment.
Would be nice to set some pattern how to prefix:
TFS - {id}: {comment} or something like that in Visual Studio settings.

Hide TODO tag in Visual Studio Task List

Our codebase has a bunch of TODO comments that no one will ever fix and that the boss refuses to remove.
I would like to hide the TODO's from the Visual Studio task list and just show my custom MEDO tags.
It appears that Visual studio will not let you remove the TODO tag from the task list. The remove button is grayed out for TODO. (You can remove all the other default tags, just not TODO.)
Does anyone know some kind of hack or something that will allow me to remove them anyway? Maybe editing some config file somewhere?
As you've discovered, Visual Studio won't allow you to modify the TODO token, but you can trick it by using the Priority settings to filter it out.
First, set your MEDO token to "High Priority" as shown here:
Then filter the Task List window to only show high priority items. (The filter button is hard to see on that column - you may need to widen it a bit.)
By default, Visual Studio includes the following tokens: HACK, TODO, UNDONE, NOTE.
All you need to do is to remove the TODO from these list of predefined tokens. (you can create your own tokens as well)
On the Tools menu, choose Options.
Open the Environment folder and then choose Task List and then delete the TODO token.
So now you will continue to have TODO comments in your codebase but they will not show in your task list.

How can I add a new task list item in visual studio?

I am aware you can use the special comments
//TODO: Something to be done...
and then see them in View-> Task List
But is there a way for me to add a comment with a different custom name and also see it in the Task List?
For example
// WorkIP:
Thanks,
It is called "custom comment tokens" and it is actually explained pretty clearly over here.
In short, you can add and edit them by going in Visual Studio to
Tools->Options->Environment->Task List
You can also select the priority of the comment token in there.

Task List in VS2012?

Since there isn't a page for 2012 and 2010 is pretty close I used these instructions
I wrote the below but I see an empty task list. How do I properly do this? Note: "Enumerate Comment Tasks" is set to true.
void myfunc() {
...
// TODO Fix this function.
...
VS 2012, 2010, 2008: When you switch to the Task List window, the topmost control is a drop-down list. Switch it from "User tasks" to "Comments". Your TODOs in your comments should appear. In case of C++ there are some constraints, look at my specific C++ answer.
For C++ the enumeration is turned off by default for performance reasons: link. See also: link. But if I enable the switch mentioned in the other StackOverflow topic, I still didn't see all of the TODOs. I have to actually open up a file with TODOs, and then I see only the TODOs in the currently open files.

How do I make TODO comments show up in the task list for C++ projects in Visual Studio 2010?

I'm trying to get my TODO comments to show up in the task list in Visual Studio 2010 for a C++ project, but they don't. I looked at this, but see no caveats other than the TODO comments need to be in the currently-open file. For example, creating a new Win32 console app places this:
// TODO: reference additional headers your program requires here
in a new file, stdafx.h. However, there's nothing in the task list.
I have "Comments" chosen from the drop-down in the task list, but it's always empty. And it's not this problem; I can open the file and be looking at the TODO comment in the code editor and no task is shown. This is not a problem for C# projects as TODO comments show up as designed in those projects; this appears to be an issue specific to C++ projects.
What else can I check?
This is off by default 'for performance reasons'. Tools + Options, Text Editor, C/C++, Formatting, Miscellaneous, Enumerate Comment Tasks = True. Feedback article is here.
Also note the comment in the MSDN article about task list comments:
With Visual C++ projects, the Task
List displays only the comments that
are found in the file that is
currently active in the editor.
This is what I got from MSDN:
Hi,
The ‘comments tasks’ in the Task List window is turned off by default
due to performance reasons. You can turn this feature on from
Tools->Options->Text Editor->C/C++->Formatting->
Miscellaneous->Enumerate Comment Tasks.
We apologize for the inconvenience.
Thanks Sumit Kumar Visual C++ Team

Resources