The Task List is essentially an integrated to-do list; it captures all the items that, for one reason or another, need attention and tracking. The Task List window then surfaces this list and allows you to interact with it. To show the window, select the View menu and choose the Task List entry illustrates the Task List window displaying a series of user tasks. Tasks belong to one of three categories—comment tasks, shortcut tasks, and user tasks—and only one category can be displayed at a time.

The drop-down at the top of the Task List window enables you to select the current category. Each category will have slightly different columns that it shows for each task category type, but they will all have a Priority column and a Description column. For instance, user tasks and shortcut tasks provide a check box that is used to track task completion; shortcut and comment tasks display a filename and line number; and so on. You can sort the tasks by any of the columns shown in the list. Right-clicking on the column headers provides a shortcut menu that allows you to control the sort behavior, as well as which columns (from a list of all supported columns) should be displayed.

Comment Tasks
Comment tasks are created within your code. Placing a code comment with a special string literal/token will cause Visual Studio to add that comment to the comment task list. Three of these tokens are defined by Visual Studio: HACK, TODO, and UNDONE. To see these tasks in your task window, ensure that you have selected “Comments” from the dropdown at the top of the task list. Double-clicking on the comment task will take you directly to the referenced comment line within the editor window.

Custom Comment Tokens
If needed, you can add your own set of tokens that will be recognized as comment tasks. From the Tools, Options dialog box, select the Task List page under the Environment section; this dialog box provides options for adding, editing, or deleting the list of comment tokens recognized by the task list. You can also set a priority against each of the tokens and fine-tune some of the display behavior by using the Task List Options check boxes, which control whether task deletions are confirmed, and by setting whether filenames or complete file paths are displayed within the task list.

Shortcut Tasks
Shortcut tasks are actually links to a line of code. You add them using the Bookmarks menu by placing the cursor on a line within the editor and then selecting Edit, Bookmarks, Add Task List Shortcut. The actual content of that line of code shows up as the task description. Double-clicking on the task takes you directly to the bookmarked line within the editor window.

User Tasks
User tasks are entered directly into the task window. A Create User Task button appears next to the category drop-down on the Task List window; this button adds a new entry within the list. You can type directly into the description column to add the task’s title.
Unlike shortcut and comment tasks, user tasks aren’t linked to a specific line of code.

Visual Studio’s automation model provides complete control over task lists. Using the exposed automation objects such as TaskList and TaskListEvents, you can, for example, programmatically add or remove tasks from the list; respond to a task being added, edited, or even selected; and control the linking between a task and an editor.

Source of Information : Sams Microsoft Visual Studio 2008 Unleashed


Subscribe to Developer Techno ?
Enter your email address:

Delivered by FeedBurner