Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I handle TODO comments in VisualStudio 2010?

I'd like Visual Studio to list all lines having "TODO: " in their beginning (usually after a comment sign which may vary depending on the file type), that can be found in any textual file in a solution (whether it be C#, VB, F#, T-SQL, ASPX, XAML or just TXT) in a special panel showing what's written in the line to the right of "TODO: ", project name (I use many projects in one solution), file name, line number, and code block name (like class and method) if possible.

Do you know of such an extension, or maybe VisualStudio has this feature built-in somewhere? For example, NetBeans sort of has this out-of-the-box.

like image 232
Ivan Avatar asked May 13 '10 01:05

Ivan


2 Answers

similar here with exemple of how comments must be tagged: http://jack-fx.com/net/2010/01/23/todo-comments-in-visual-studio/

like image 171
Patrik Lindström Avatar answered Nov 03 '22 01:11

Patrik Lindström


Here's how I'm using TODOs in VS as a poor man's issue tracker. Assumes that all my solutions are stored under some folder, let's call it "My Projects".

  1. Open "Find and Replace". Give a code name to "My Projects".
  2. In "Find", add //TODO (or //BUG, or other custom tag)
  3. In "Look In", specify the code name created in #1
  4. In "File types", leave only *.cs files (or wherever you store comments)
  5. Finally, in List results select "Find results 2 window" (in VS Pro or higher, n/a in VS Express)

Simply put, it does a full text search and displays lines with TODOs in a "Find Results 2" window. All you have to do is copy the list and open in your favorite text editor.

like image 39
SUVer Avatar answered Nov 03 '22 00:11

SUVer