简体   繁体   English

从不使用Visual Studio的代码内XML文档生成C#文档输出?

[英]Generate C# docs output from in-code XML documentation without Visual Studio?

Without building the project is it possible to just scan the code and get the triple slash in-code document and output them? 如果不构建项目,是否可以仅扫描代码并获取代码中的三斜杠文档并将其输出? (XML, Markdown, etc.) (XML,Markdown等)

/// <summary>
/// Resume playing of a previously paused audio with fade in length
/// specified by an argument.
/// </summary>
/// <param name="fadeLengthSeconds">Fade out length to use.</param>
public void ResumeFade(float fadeLengthSeconds)
{

Currently I am using Visual Studio Code and it seems to know about all my documentation in the Intellisense. 目前,我正在使用Visual Studio Code,并且它似乎了解Intellisense中的所有文档。 I have .sln file which seems to link to the assembly containing all the information. 我有.sln文件,它似乎链接到包含所有信息的程序集。 If VSCode can read it, I guess there might be other program that is not the full Visual Studio that can generate a doc output from it. 如果VSCode可以读取它,我想可能还有其他程序不是可以从中生成doc输出的完整Visual Studio。 (Be it XML or Markdown) (是XML还是Markdown)

I would like to automatically generate an input for Slate 我想自动为Slate生成输入

In the end I use Visual Studio Community just for getting the XML then use : 最后,我仅使用Visual Studio Community来获取XML,然后使用:

https://github.com/Pxtl/XmlCommentMarkDownGenerator https://github.com/Pxtl/XmlCommentMarkDownGenerator

It is a NuGet package, but works as a CLI tool. 它是一个NuGet软件包,但可以用作CLI工具。 Works on macOS with mono so you could execute an exe file in macOS. 在具有mono macOS上运行,因此您可以在macOS中执行exe文件。

mono PxtlCa.XmlCommentMarkDownGenerator.exe -i ../../Temp/bin/Debug/Assembly-CSharp.xml -o docs.md

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM