Linux:
*) mono project should be installed together with the mono-tools and monodoc
package. The binaries monodoc, monodocer and monodoc2html should be available
then.
*) the compiler needs to know that he should generate the xml file out of
the /// tags like ... .
This can be achived with the additional option -doc:FILENAME when calling the
gmcs (mcs for .NET 1.0) compiler in the console or by selecting "Generate XML
Documentation" in the monodevelop IDE in the ProjectProperties.
*) Now a XML file should be present in the build directory (if no path was
specified). We can now generate a documentation which should be readable with
monodoc. This documentation is stored in some new xml files.
To generate it use:
monodocer -assembly:NameOfTheAssemblyFile.exe -importslashdoc:NameOfTheGeneratedXMLFILE.XML
-name:NameOfTheProject -overrides -path
DestinationPathforTheDocumentation -pretty
*) Now a couple of xml files are written to
the "DestinationPathforTheDocumentation". You can now use monodoc to read it
and even update it without writting XML-tags.
*) To generate a documentation like javadoc or msdn which is readable with any
browser you have to accomplish the following last step:
monodocs2html -source DestinationPathforTheDocumentation -dest
DestinationForTheHTMLDocumentation
the DestinationPathforTheDocumentation path is the same used in the monodocer
step, but here it is used as source. So monodocs2html takes all the xml files
generated with monodocer and it converts it in HTML, which then can be opened
with the browser and looks similar to javadoc.
*) you're finished now. it's quite easy and comfortable isn't it? ;)
-----------------------------------------------------------------------------------
Windows:
*) the compiler needs to know that he should generate the xml file out of
the /// tags like ... .
This can be achived with the additional option /doc:FILENAME when calling the
ms csharp compiler in the console or by selecting "Generate XML
Documentation" in the VisualStudio IDE in the ProjectProperties.
*) Now a XML file should be present in the build directory (if no path was
specified). We can use now a opensource tool to generate javadoc or msdndoc
look like documentation.
There are several ndoc projects:
NDOC: does not work with .NET 2.0 and higher- features
NDOC 2005: fork of the NDOC project works with .NET 2.0 features
NDOC reloaded: not checked
NDOC2WORD: not checked
With the normal NDOC you can't generate doc's for .NET 2.0 projects, so have
to use NDOC 2005. Under Windows you can install the binary, select the
XML-File and the Assembly, select the theme (javadoc, msdn,...) and then the
program will generate a humanreadable documentation. Unfortunately there are
some hardcoded pathnames for the location of the XSLT-files. So if you are not
root on the machine you can't generate those folders.