c# - 如何从 XML 文档注释创建网站?

标签 c# .net documentation

<分区>

我想用 C# 创建一个文档网站 XML documentation comments .

来自 Python 社区的示例。这Scipy documentation由这个 python code 创建使用名为 Sphinx 的工具.

对于 C# 项目,这样的事情是否可行?


.NET 项目(不是我的)中的 XML 文档注释示例 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>

编辑:我在其他问题中能找到的全部建议是“使用 Sandcastle” '.据我从它的(具有讽刺意味的是有限的)文档中可以看出,它只能创建 Windows 帮助文件 (.chm)。那是对的吗?

最佳答案

Edit: 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 可以构建广泛的输出。

但是,现在您真的想要Sandcastle Help-File Builder (SHFB)这让事情变得更好。仍然不是完全无痛,但相当不错。 SHFB 的文档通常也很合理。

有趣的是,你应该举一个 Noda Time 的例子 - SHFB 正是我们用来生成 online API reference 的东西.

关于c# - 如何从 XML 文档注释创建网站?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22228111/

相关文章:

c# - 如何包含 xsd :documentation in the C# class generated with XSD. exe?

c# - 在 Entity Framework 中设置默认值 - 数据库优先

c# - 如何在 C# 中使用 C++ dll 导出的类

asp.net - 使用 IdentityServer4 进行无限循环重定向

ios - 为什么我应该在 main 中为串行队列创建上下文并在 start 中为并发队列创建上下文?

php - 将 phpdoc 转换为 Dash 可用的 docset

c# - Microsoft Razor Syntax 如何在不向客户端公开的情况下运行服务器端代码?

c# - 查找使用 c# 启动的新进程

c# - Asp .Net Core 中的自定义模型绑定(bind)

c# - 为什么var不能应用于成员变量