Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to format Visual Studio XML documentation for display on the web

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!

like image 833
Chev Avatar asked Mar 04 '11 20:03

Chev


People also ask

How do I beautify XML in Visual Studio?

To access XML formatting options, choose Tools > Options > Text Editor > XML, and then choose Formatting.

How do I create an XML document in Visual Studio?

From the menu bar, choose Tools > Options to open the Options dialog box. Then, navigate to Text Editor > C# (or Visual Basic) > Advanced. In the Editor Help section, look for the Generate XML documentation comments option.

What is used for formatting XML documents?

XSL - More Than a Style Sheet LanguageXSL-FO - a language for formatting XML documents (discontinued in 2013)


1 Answers

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.

like image 106
Oded Avatar answered Sep 28 '22 07:09

Oded