16

So, I have TODO comments showing up in my task list as long as the TODO comment is in a C# file. The TODO comments in HTML, CSS, or JScript aren't showing up in my Task List. Is there a way to enable this in Visual Studio 2010 Pro?

Watermark Studios
  • 1,173
  • 1
  • 10
  • 24
  • I believe (but not sure, hence comment) that the comment marker has to be that of your Development Language to show up as a Task. i.e. `// TODO fix this` will work but `` won't. – Widor Oct 06 '11 at 16:50
  • In JScript I did // TODO fix this, in HTML I did both @*TODO: Fix this*@ and . None of them worked. – Watermark Studios Oct 06 '11 at 16:52
  • 1
    When I said 'development language' I meant the comment marker of your .NET language, so C#, VB.NET etc. However, despite my early optimism I think it only works in code files even if you use `` – Widor Oct 06 '11 at 16:54

5 Answers5

8

Simple answer: NO.

From: How to: Create Task List Comments

The Task List displays comments in your code that begin with the comment marker for your development language. Next to the comments, the Task List also displays a default task token, such as TODO, HACK, or UNDONE, or a custom comment token. The number of comments that appear in the Task List may change, depending on the type of project you are working on. With Visual Basic and Visual C#, the Task List displays all the comments in the solution. With Visual C++ projects, the Task List displays only the comments that are found in the file that is currently active in the editor.

So it is only supported in VB, C# and C++ projects.

kroonwijk
  • 8,340
  • 3
  • 31
  • 52
  • 3
    It is also supported in cshtml files. `@{//TODO:comment}` – lappy Jan 16 '14 at 09:50
  • 1
    This guidance is out of date. As of VS2013, using tokens in HTML comments (no C# escaping necessary) will work. http://msdn.microsoft.com/en-us/library/txtwdysk.aspx#tokensComments – CBono Nov 17 '14 at 21:25
  • @CBono - really? Where on that page does it say tokens can be used in HTML – userSteve Jun 14 '16 at 09:39
  • The page has changed. I found this UserVoice suggestion for the same that was originally marked as "completed" for v2013.4. However, someone else pointed out it doesn't work. Perhaps MS decided not to release it? https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/5970767-parse-task-list-tokens-todo-etc-in-html-and-asp – CBono Jun 14 '16 at 13:44
5

With Resharper, which you should have if you don't, has the todo list window your looking for. It parses all the those files (js, css, html, c#, etc.). You can dock that window with all your other windows.

rkever
  • 874
  • 9
  • 10
  • Telerik's JustCode also has this view. – cori Jan 09 '13 at 22:06
  • 2
    On a slightly unrelated topic (I came here by googling), Python "TODO" items do not show up in Studio, as mentioned above. Even with Resharper in Studio, I could not get Python comment TODO's to show up, I'm not sure why? However, since Resharper is made by Jetbrains, I decided to try out the Pycharm IDE. It has a great 'Resharper' Task list. It also has really good code completion, apparently including the ability to capture your own comments as tooltips. So far I like it alot on Windows! http://forum.jetbrains.com/thread/PyCharm-1408?message=PyCharm-1408-2 – AnneTheAgile Mar 29 '13 at 00:24
4

<% //TODO: page side task %>

i.e. escape to code and then use that language's tasking comment.

So, then alternatively:
<% 'TODO: page side task for VB %>

Note Arun's caveat about it only showing with the page open, which might be why "NO" is the top answer, because it doesn't fully accomplish what was asked.
(In fact this really just expands his answer, but I didn't yet have the points to make it a comment.)

gremlin
  • 73
  • 6
1

It works in Visual Studio 2015

Only issue is that, that particular page is needed to be opened to view the tasks.

Add Task as in normal C#

//TODO: this is javascript task
Wai Ha Lee
  • 8,598
  • 83
  • 57
  • 92
Arun Prasad E S
  • 9,489
  • 8
  • 74
  • 87
0

Try :

<!-- //TODO::this is to do comment -->