如何导出 C# / VisualStudio 2008 中的代码文档?

发布于 2024-07-04 13:47:40 字数 154 浏览 11 评论 0原文

我一直注重使用 C# xml 语法为类和方法编写漂亮的代码注释。 我一直希望以后能够轻松导出它们。

今天我实际上必须这样做,但我不知道如何做。 我有什么遗漏的吗? 我想要进入菜单->构建->构建代码文档,但是没有选项可以做到这一点。

I have always made a point of writing nice code comments for classes and methods with the C# xml syntax. I always expected to easily be able to export them later on.

Today I actually have to do so, but am having trouble finding out how. Is there something I'm missing? I want to go Menu->Build->Build Code Documentation, but there is no option to do that, there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

骷髅 2024-07-11 13:47:40

以前的答案确实已经过时了。 以下是一些更现代的选项:

The previous answers are really out of date. Here are some more modern options:

  • DocFX: This is probably your best bet because it runs on Linux, macOS, and Windows and it's supported by the .NET Foundation.
  • Sandcastle Help File Builder (SHFB): This one is still supported but it might not be as active.
梦萦几度 2024-07-11 13:47:40

迟来的评论,但值得补充的是,尽管 Sandcastle 已被封存,Sandcastle 帮助文件生成器仍在积极开发中,并且我发现在处理这种情况时,它非常强大且易于深入研究 - 在几个小时内安装到丰富的 .chm 和 .html/.asp 输出。

Late comment, but worth adding that even though Sandcastle is mothballed, the Sandcastle Help File Builder remains in active development, and I found it very powerful and straightforward to dive into when dealing with just this situation--install to rich .chm and .html/.asp output in a couple hours.

恋竹姑娘 2024-07-11 13:47:40

您可以尝试 NDOCSandCastle 如果您不介意使用第 3 方工具。

You could try NDOC or SandCastle if you dont mind using 3rd party tools.

心不设防 2024-07-11 13:47:40

实际上它在项目属性中。 “构建”选项卡、“输出”部分、“XML 文档文件”,然后输入文件名。 它将构建在项目的每次构建上。

之后,您可以使用 沙堡

Actually it's in the project properties. Build tab, Output section, XML documentation file, and enter the filename. It will be built on every build of the project.

After that you can build the actual help with Sandcastle.

宣告ˉ结束 2024-07-11 13:47:40

Sandcastle 非常适合生成文档,并且它支持多种不同的生成格式。 据我所知,没有任何 Visual Studio 集成,但有一个 SandcastleGUI 对于可用的。

Sandcastle works pretty well for generating documentation and it supports a couple different formats for the generation. As far as I know, there isn't any Visual Studio integration for it, but there is a SandcastleGUI for it that is available.

静赏你的温柔 2024-07-11 13:47:40

如果您使用 LINQ to SQL,请务必小心,因为您将无法轻松地将可持续注释添加到自动生成的对象中。

Be careful if you're using LINQ to SQL as you won't be able to easily add sustainable comments to the auto-generated objects.

动次打次papapa 2024-07-11 13:47:40

原来的 NDoc 项目(其他人提到的)已经死了,但是有一个名为 NDoc3 的新项目。

NDoc3 支持 .NET 2.0 - 3.5。 它目前是测试版,对我来说效果很好。 我不确定该项目是否仍然活跃 - 最后一个测试版于 2009 年 4 月发布。

The original NDoc project (mentioned by others) is dead, but there is a new project called NDoc3.

NDoc3 supports .NET 2.0 - 3.5. It is currently available as a beta version and worked great for me. I'm not sure if the project is still active - the last beta was release in april 2009.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文