简体   繁体   English

在Visual Studio中自定义C#标准文档生成器(XML注释)

[英]Customize C# Standard Document Generators (XML Comments) in Visual Studio

  • Is there any other kind of documentation generator shortcuts for C# (like /// Generates function() Code) or any tool item (like signature in email @ outlook) in VS IDE, For following MS Standard Coding & Documentation & making understand to other co-developer working on same project. 在VS IDE中是否有任何其他类型的C#文档生成器快捷方式(如///生成function()代码)或任何工具项(如email @ outlook中的签名),用于以下MS标准编码和文档以及了解其他负责同一项目的共同开发人员。
  • How to change the Format of the Generated document in visual stdio IDE by default comment format to custom comment format shown below. 如何将visual stdio IDE中生成文档的格式默认注释格式更改为自定义注释格式,如下所示。

Ex: 例如:

 1. **Default Format**

     // Name:      
     // Author:     
     // Description: <summary></summary>    
     // Parameters: <param name="abc"></praram>  
     // Returned Value: <returns></returns>

 2. **New Custom Format**

     // Application:  <project></project>  <version></version> 
     // Created Developer: <developer></developer>
     // Created Date: <date></date>  
     // Last Modified:     
     // Last Modified Developer:     
     // Parameters: <param name="abc"></praram>      
     // Return Type: <returns></returns>    
     // Description: <summary></summary>

One of the tools that let you customize the default XML comment is our VSdocman . 我们的VSdocman是允许您自定义默认XML注释的工具之一 You can pre-define the comment for each code element type (method, property, ...) and even for particular name or type. 您可以为每个代码元素类型(方法,属性,...)预定义注释,甚至可以为特定名称或类型定义注释。 It's called comment templates . 它被称为评论模板 Then in the code editor, right-click and select "Add XML comment". 然后在代码编辑器中,右键单击并选择“添加XML注释”。 In addition, you can generate a documentation (HTML, CHM, docx, VS help, ...) from your comments with the tool. 此外,您可以使用该工具从您的评论中生成文档(HTML,CHM,docx,VS帮助......)。

This is now >6 months old, but I think the answer to this question: Change default XML comment snippet in Visual Studio will get you where you want to be. 现在已经超过6个月了,但我认为这个问题的答案是: 在Visual Studio中更改默认的XML注释片段可以帮助您实现目标。 Just add your custom comment structure to the CDATA section, and you're all set. 只需将自定义注释结构添加到CDATA部分,即可完成设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Studio C#的标准命名约定文档? - standard naming convention document of Visual Studio C#? Visual Studio C#中的内联标准Xml文档 - Inline Standard Xml Documention in Visual Studio C# 在Visual Studio中查找C#注释块 - Finding blocks of C# comments in Visual Studio 使用XML注释创建的C#文档在哪里(Visual Studio 2010)? - Where is C# documentation using XML comments created (Visual Studio 2010)? 是否有一种有效的方法来处理 Visual Studio 中重复的 XML 注释 C# 代码 - Is there an efficient way to handle repeating XML comments C# code in Visual Studio Visual Studio 2015 / C#6 / Roslyn无法在PCL项目中编译XML注释 - Visual Studio 2015 / C# 6 / Roslyn can't compile XML comments in PCL project 在Visual Studio 2010中为C#启用三/三斜杠XML注释 - Enabling triple/three slash XML comments in Visual Studio 2010 for C# C# 文件的 Visual Studio“文档大纲” - Visual Studio "document outline" for C# file 如何一次性删除Visual Studio中当前文档中的所有C#方法/属性/字段“摘要”注释(以///开头)? - How to remove all C# methods/properties/fields “summary” comments (starting with ///) in current document in Visual Studio with one shot? 如何使用XML注释和Doxygen记录C#项目/程序集? - How to document C# projects/assemblies with XML comments and Doxygen?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM