Visual studio tasklist and custom tags

Discussion created by VKamakodu on Nov 18, 2008
Latest reply on Nov 27, 2008 by andreas

As a developer, there are many times when you have hardcoded something but forgot to remove it. Or you have something on your mind but because of time constraints you just want to stub out something and finish it later. Wouldn't it be nice if I can tag them as my to do lists and work on them later? 


Well, Visual studio provides the 'TaskList' pane that can be used for this.  If you don't see it, click View->Tasklist on Visual studio 2008 IDE menu.


VS provides a few built-in tags (tokens) such as TODO, HACK etc. All you have to do in your code is to use them and it will automatically appear on the task list. In your code, just write something like shown.


public void MyMethod() { //TODO: I need to add code here later }


Now what if I want to create my own tag names, use them and make them appear under task list? It's easy. On VS 2008 menu, click Tools->Options->Environment->Task List. You would see the current tokens on the right hand pane. Just add whatever tag name you want to add. Let's say I added a custom tag named  'MyProjectDEMO'. Then I can use it as shown below.


public void MyMethod() { //MyProjectDEMO: need to show this section for my demo}


On your Task List pane, not only do you see the list, you would also see the file names and line numbers.