问题
I am using Visual Studio 2010 and have started being a good boy and documenting all my code as I write it, via XML comments. I have a well-documented project and I even figured out how to make Visual Studio spit out a complete XML document when doing a build. My question is, what is the best way to format/display this document on the web so that it appears in a nice friendly and usable format like MSDN? Is there a tool that does this easily?
Thanks in advance!
回答1:
Check out Sandcastle Help File Builder. This is a GUI tool that makes Sandcastle pretty easy to work with. It will install to a folder in Start Menu->Program Files->Sandcastle Help File Builder.; It's pretty easy to use, but it's not incredibly fast.
Hope that helps!
回答2:
Check out Sandcastle.
Sandcastle produces accurate, MSDN style, comprehensive documentation by reflecting over the source assemblies and optionally integrating XML Documentation Comments.
Wikipedia has more information and links to additional projects that integrate with sandcastle.
Another option (which appears to be much easier to use) is docu:
A documentation generator for .Net that isn't complicated, awkward, or difficult to use. Given an assembly and the XML that's generated by Visual Studio, docu can produce an entire website of documentation with a single command.
A third option is NDoc:
NDoc generates class library documentation from .NET assemblies and the XML documentation files generated by the C# compiler (or with an add-on tool for VB.NET).
NDoc uses pluggable documenters to generate documentation in several different formats, including the MSDN-style HTML Help format (.chm), the Visual Studio .NET Help format (HTML Help 2), and MSDN-online style web pages.
回答3:
NDoc is also an option. But i would go with sand castle and that was what i did.
回答4:
I have created an Open source project to expose them in WebPages Check @ AutoHelp
AutoHelp reads the DLL & XML Doc files, generates help pages and exposes them to the users. AutoHelp uses ASP.NET MVC 5, ASP.NET WebApi, TypeScript, jQuery and Bootstrap to be a modern web app.
回答5:
In 2020 you probably want to go with doxygen. Works like a charm for my .NET Core project.
Doxygen is the de facto standard tool for generating documentation from annotated C++ sources, but it also supports other popular programming languages such as C, Objective-C, C#, PHP, Java, Python, IDL (Corba, Microsoft, and UNO/OpenOffice flavors), Fortran, VHDL and to some extent D.
Doxygen can export to HTML, LaTeX, RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources.
来源:https://stackoverflow.com/questions/5199002/how-to-format-visual-studio-xml-documentation-for-display-on-the-web