生成C#文档而不构建Xml文档 [英] Generating C# documentation without building an Xml document

查看:344
本文介绍了生成C#文档而不构建Xml文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我看到从C#XML注释生成文档和许多其他人喜欢它,但没有一个建议的工具为我需要的工作。



我需要一个免费的工具,可以从我的源代码生成文档(最好在html中),而不使用Visual Studio创建的xml文档。该项目有警告,因为错误打开并检查生成该XML文件的选项创建数百个错误。实际上,这排除了90%的c#文档生成器,包括Sandcastle,NDoc3,Live Documenter,docu和ImmDoc。



Doxygen几乎可以工作,但是我不能似乎得到它为重载泛型类生成文档,例如:

  public class MyClass&Foo> 
public class MyClass< Foo,Bar> :MyClass< Foo>

MyClass有文档,但MyClass不存在。



那么这个问题就是这样的:


  1. 一个文档生成器我没有看到可以处理这种情况,

  2. 一个配置选项在我列出的一个工具,将使其工作,而不需要xml文档文件,

  3. 甚至一种方式转关闭只是注释编译器警告而不影响生成警告?

编辑。 >通过方法#3的解决方案是抑制与xml注释相关的以下警告:1570,1571,1572,1573,1574,1580,1581,1584,1587,1589,1590,1591,1592,1598,1710, 1711,1712,1723

解决方案

您可以禁用警告 1591 在项目属性中,然后生成XML。


First of all, I've seen Generating Documentation from C# XML Comments and many others like it, but none of the suggested tools work for what I need.

I need a free tool that can generate documentation (preferably in html) from my source code without using the xml document created by Visual Studio. The project has warnings as errors turned on and checking the option to generate that xml file creates hundreds of errors. In effect, this rules out 90% of c# documentation generators, including Sandcastle, NDoc3, Live Documenter, docu, and ImmDoc.

Doxygen almost works, but I can't seem to get it to generate documentation for overloaded generic classes, such as:

public class MyClass<Foo>
public class MyClass<Foo, Bar> : MyClass<Foo>

MyClass has documentation, but MyClass does not.

So then the question - is there:

  1. a documentation generator I haven't seen that can handle this case,
  2. a config option in one of the tools I've listed that would make it work without requiring the xml-documentation file,
  3. or even a way to turn off just the comment compiler warnings without affecting the build warnings?

Edit. A solution by way of method #3 is to suppress the following warnings relating to xml comments: 1570, 1571, 1572, 1573, 1574, 1580, 1581, 1584, 1587, 1589, 1590, 1591, 1592, 1598, 1710, 1711, 1712, 1723

解决方案

You can disable warning 1591 in Project Properties, then generate the XML.

这篇关于生成C#文档而不构建Xml文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆