views:

623

answers:

4

I had to reinstall all my development tools after a hard drive failure and I'm having a problem with Visual Studio.

I had a bunch of //TODO: items scattered throughout my projects and I can't get them to show up in my Task List under the User Tasks. I restarted Visual Studio to no effect, then I checked the tokens in the Task List settings and TODO is listed.

Any idea on how I can get them to be listed again? I don't remember having to change any settings last time I installed VS to get this to work.

A: 

I had the same problem with #warning comments. You can find more in my question here: http://stackoverflow.com/questions/1087561/warning-not-always-being-shown-in-the-error-list

I'm not sure if it's the same problem, but it's a good place to start.

Jon Tackabury
+2  A: 

By default, TODO comments are only shown in the task list for currently opened files. Visual Studio doesn't automatically search through the entire solution.

Over time, many users end up with most of a project's files open most of the time (at least for moderately sized projects) because Visual Studio remembers these preferences in a *.suo file. They just don't close the files, and so they tend to accumulate. The *.suo files themselves are not typically kept in source control, and so when rebuilding your workstation everything is not opened up right away anymore and the tasks won't show.

Joel Coehoorn
You are correct, as I was hunting through my source code I came across a TODO and it magically appeared in my list. Now I just need to go find all the other ones...
Brandon
As an aside: I've heard of this behavior cause more than a few bugs to slip into production at shops that were using customized TODO as the primary bug tracking tool. Developers didn't realize they weren't seeing their whole task list :(
Joel Coehoorn
@Joel, that's what I'm afraid of. I know I left TODOs scattered around that are probably important. I always thought all my tasks were there. Now I guess I should keep more detailed records in the actual bug tracking software.
Brandon
+1  A: 

I was under the impression that even when the Task List is working normally, TODO items are only shown for currently open files (or some other limitation)?

I have got it to the habit of just using the "Find in files" text search to list every TODO in the entire solution. It's bit less pretty but it works every time.

frou
+1, I don't think I've ever used the Find in Files feature. Thanks for the tip.
Brandon
+1  A: 

An easy way to find any TODO items is to simply use the Find in Files search option, search for //TODO, and select the Look in option to be 'Entire Solution'.

This will look in all the files, and not just the open ones.

Andy
+1, Thanks for the tip. I've always just used regular searching. Didn't even know about this Find in Files feature.
Brandon