6

我希望 Visual Studio 列出所有开头有“TODO:”的行(通常在注释符号之后,这可能因文件类型而异),可以在解决方案的任何文本文件中找到(无论是 C# , VB, F#, T-SQL, ASPX, XAML 或者只是 TXT)在一个特殊的面板中显示了写在“TODO:”右侧的行中的内容,项目名称(我在一个解决方案中使用了许多项目),文件名,如果可能,行号和代码块名称(如类和方法)。

您是否知道这样的扩展,或者 VisualStudio 在某处内置了此功能?例如,NetBeans 有点开箱即用。

4

3 回答 3

2

此处与注释必须如何标记的示例类似:http: //jack-fx.com/net/2010/01/23/todo-comments-in-visual-studio/

于 2011-04-30T20:08:17.117 回答
2

Here's how I'm using TODOs in VS as a poor man's issue tracker. Assumes that all my solutions are stored under some folder, let's call it "My Projects".

  1. Open "Find and Replace". Give a code name to "My Projects".
  2. In "Find", add //TODO (or //BUG, or other custom tag)
  3. In "Look In", specify the code name created in #1
  4. In "File types", leave only *.cs files (or wherever you store comments)
  5. Finally, in List results select "Find results 2 window" (in VS Pro or higher, n/a in VS Express)

Simply put, it does a full text search and displays lines with TODOs in a "Find Results 2" window. All you have to do is copy the list and open in your favorite text editor.

于 2013-07-27T08:27:02.040 回答
0

SQL 脚本不支持此功能。请点击升级此BUG:https ://connect.microsoft.com/VisualStudio/feedback/details/595430/task-list-comment-tasks-dont-show-sql-tasks#details

于 2012-11-20T15:55:06.570 回答