问题描述
我想从C#创建一个文档网站。
I would like to create a documentation website from C# XML documentation comments.
Python社区的示例。此是由此创建的使用名为 python代码 = http://sphinx-doc.org/ rel = noreferrer>狮身人面像。
An example from the Python community. This Scipy documentation is created from this python code using a tool named Sphinx.
对于C#项目,有什么可能的?
Is anything like that possible for a C# project?
.NET项目中XML文档注释的示例(不是我的)
Example of XML documentation comments in a .NET project (not mine) https://github.com/haf/NodaTime/blob/master/src/NodaTime/Period.cs#L26
/// <summary>
/// Represents a period of time expressed in human chronological terms: hours, days,
/// weeks, months and so on. All implementations in Noda Time are immutable, and return fields
/// in descending size order: hours before minutes, for example.
/// </summary>
public sealed class Period : IEnumerable<DurationFieldValue>, IEquatable<Period>
编辑:我能找到的建议的全部范围其他问题是使用。据我从(具有讽刺意味的是有限的)文档中可以看出,它只能创建Windows帮助文件( .chm
)。那是对的吗?
The full extent of advice I could find in other questions was 'use Sandcastle'. As far as I can tell from its (ironically limited) documentation, it can only create Windows help files (.chm
). Is that correct?
推荐答案
不,那是不正确的。沙堡(Sandcastle)可以构建广泛的输出。
No, that's not correct. Sandcastle can build a wide range of output.
但是,如今,您真的想要,使事情变得更好了。仍然不是完全没有痛苦,但是还算不错。 SHFB的文档通常也很合理。
However, these days you really want Sandcastle Help-File Builder (SHFB) which makes things a whole lot better. Still not entirely painless, but pretty good. The documentation for SHFB is generally pretty reasonable, too.
有趣的是,您应该举一个Noda Time的例子-SHFB正是我们用来生成。
Funny you should give an example of Noda Time - SHFB is precisely what we use to generate our online API reference.
这篇关于如何从XML文档注释创建网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!