Question

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.

Was it helpful?

Solution

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. Users generally don't close the files, and so open files 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.

OTHER TIPS

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.

I've noticed that the TODO comments will show up in the Task List of Closed Files which are under the App_Code folder. Any comments in the code behind of a page or usercontrol (ie. not in the App_Code Folder) then it won't show in the Task List.

I have started using the #warning and starting the warning message with TODO: in the hope that this issue may one day be fixed!

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top