Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.Net XML comment into API Documentation

Is there an easy way to produce MSDN-style documentation from the Visual Studio XML output?
I'm not patient enough to set up a good xslt for it because I know I'm not the first person to cross this bridge.

Also, I tried setting up sandcastle recently, but it really made my eyes cross. Either I was missing something important in the process or it is just way too involved.

I know somebody out there has a really nice dead-simple solution.

I'm reiterating here because I think my formatting made that paragraph non-inviting to read:

I gave sandcastle a try but had a really hard time getting it set up. What I really have in mind is something much simpler.

That is, unless I just don't understand the sandcastle process. It seemed like an awful lot of extra baggage to me just to produce something nice for the testers to work with.

like image 515
MojoFilter Avatar asked Aug 03 '08 22:08

MojoFilter


People also ask

How do you put comments in XML?

An XML comment encountered outside the document type declaration is represented by the Comment value syntax element. It contains the comment text from the XML message. If the value of the element contains the character sequence --> , the sequence is replaced with the text --> .

What is the use of XML comments in C#?

C# documentation comments use XML elements to define the structure of the output documentation. One consequence of this feature is that you can add any valid XML in your documentation comments. The C# compiler copies these elements into the output XML file.

How do you comment multiple lines in POM XML?

If you are using Eclipse IDE you can comment out lines in an XML file by highlighting them and press Ctrl+Shift+c.


3 Answers

You're looking for Sandcastle

Project Page: Sandcastle Releases

Blog: Sandcastle Blog

NDoc Code Documentation Generator for .NET used to be the tool of choice, but support has all but stopped.

like image 133
Karl Seguin Avatar answered Oct 20 '22 10:10

Karl Seguin


I've just set up Sandcastle again. Try installing it (the May 2008 release) and search for SandcastleGui.exe or something similar (it's in the examples folder or so).

Click Add Assembly and add your Assembly or Assemblies, add any .xml Documentation files (the ones generated by the compiler if you enabled that option) and then Build.

It will take some time, but the result will be worth the effort. It will actually look up stuff from MSDN, so your resulting documentation will also have the Class Inheritance all the way down to System.Object with links to MSDN and stuff.

Sandcastle seems a bit complicated at first, especially when you want to use it in an automated build, but I am absolutely sure it will be worth the effort.

Also have a look at Sandcastle Help File Builder, this is a somewhat more advanced GUI for it.

like image 44
Michael Stum Avatar answered Oct 20 '22 11:10

Michael Stum


You should also use the Sandcastle Help File Builder. It provides you with a ndoc like GUI for generating help files so you don't have to do anything from a command prompt.

Welcome to the Sandcastle Help File Builder Project

like image 20
AaronS Avatar answered Oct 20 '22 12:10

AaronS