.NET Tips and Tricks

Blog archive

Creating a Useful Task List in Visual Studio

What developers like to do best is to write code (and design the applications that will let them right code). Administrative overhead just gets in the way of writing code—even something as simple as a To Do list. Yet developers are constantly getting part way through a problem and having to go and work on something else, or to address another part of the application before returning to finish what they were working on.

The Visual Studio Task List actually helps with this. Just type a comment that begins with ToDo (e.g. 'ToDo or //ToDo) and is followed by some text, and a line with your text appears in the Task List. To see the Task List, from the View menu, and select Task List. When the Task List window displays, switch the drop down list at its top to Comments. Once you see the list of notes that you (or someone else) has left on the Task List, double-clicking on an item in the list takes you to that section of your application.

In addition to ToDo, there are two other tokens: HACK (for…) and UNDONE (for…). However, if you (or your team) wants to mark additional types of material, you can create your own custom tokens. Select Options From the Tools menu, and in the Options dialog, expand the Environment node to find the Task List entry. Enter a name for your token in the Name text box and click the Add button to define your token (if your token will be used in a case-sensitive language, make life easy for the token's users by making the name either all uppercase or all lowercase).

Unfortunately, there's no easy way to share custom tokens among a team. You can export your settings (which include custom tokens) into a file so that other developers can import your custom tokens…but it's probably just as easy for each developer to set up any new tokens you invent in their copy of Visual Studio (besides, then the developer will know what tokens are available).

Visual Studio 2010 displays all your tokens when you open a project -- earlier versions wouldn't populate the Task List until you opened the file containing the token. However, in earlier versions of Visual Studio, if you do a Find and Replace replacing "ToDo" with "ToDo" and click the Replace All button, Visual Studio would find all of the files containing a ToDo token and open them for you, updating the Task List as it goes.

Posted by Peter Vogel on 01/30/2012


comments powered by Disqus

Featured

  • Creating Reactive Applications in .NET

    In modern applications, data is being retrieved in asynchronous, real-time streams, as traditional pull requests where the clients asks for data from the server are becoming a thing of the past.

  • AI for GitHub Collaboration? Maybe Not So Much

    No doubt GitHub Copilot has been a boon for developers, but AI might not be the best tool for collaboration, according to developers weighing in on a recent social media post from the GitHub team.

  • Visual Studio 2022 Getting VS Code 'Command Palette' Equivalent

    As any Visual Studio Code user knows, the editor's command palette is a powerful tool for getting things done quickly, without having to navigate through menus and dialogs. Now, we learn how an equivalent is coming for Microsoft's flagship Visual Studio IDE, invoked by the same familiar Ctrl+Shift+P keyboard shortcut.

  • .NET 9 Preview 3: 'I've Been Waiting 9 Years for This API!'

    Microsoft's third preview of .NET 9 sees a lot of minor tweaks and fixes with no earth-shaking new functionality, but little things can be important to individual developers.

  • Data Anomaly Detection Using a Neural Autoencoder with C#

    Dr. James McCaffrey of Microsoft Research tackles the process of examining a set of source data to find data items that are different in some way from the majority of the source items.

Subscribe on YouTube