开发者

How do I generate HTML-only documentation from an aspdotnet web project?

I have commented all the code with the appropriate ms xml documentation tags. How do I generate HTML-only (or pdf) documentation for all of the commented code? I have downloaded sandcastle, but can't figure out how to get to the next step.开发者_开发百科 Thanks!


You can look at ndoc http://ndoc.sourceforge.net/

Basically, in your project's properties you need to turn on XML documentation. So right click on your project, choose properties, navigate to the Build tab and check the XMLDocumentation checkbox.

This produces an xml file (not html). You then need to transform (or parse) the xml file using an XSLT stylesheet. That's where nDoc comes it.


Sandcastle (the successor to ndoc) is an excellent documentation tool but ironically the path to using it easily and effectively is not well-documented. You should use the Sandcastle Help File Builder (SHFB) or similar platform rather than attempting to access Sandcastle directly. (Think of the sun: it is great to have around, but you do not want to look directly at it without some strong sunglasses :-) The question then becomes how to use SHFB?

My September 2010 article Taming Sandcastle: A .NET Programmer's Guide to Documenting Your Code details what you need to do, and points out a lot of the potential pitfalls you are likely to encounter. In October 2010 I followed that up with a one-page wall chart that summarizes the XML documentation comment lexicon for SHFB.

From my research for the article, here is a complete list of other useful resources:

  • Eric Woodruff’s Sandcastle Help File Builder Documentation (SHFB Creator)
  • C# Programming Guide: Recommended Tags for Documentation Comments (MSDN)
  • Wm. Eric Brunsen’s XML Documentation Comments Guide (Dynicity)
  • Anson Horton’s XML Documentation in C# (Microsoft C# Compiler Program Manager)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜