0

In vb.net I can write an XML documentation by using some tags, like the following

'''<summary>
''' Hello there!
'''</summary>

In Java, I simply can export my Javadoc documentation in a single click (it generates an Html file).

Is there a way to do something similar in vb.net?

Peter Macej
  • 4,831
  • 22
  • 49
Calaf
  • 1,133
  • 2
  • 9
  • 22
  • Why would you need that if documentation is visible in the IDE when you hover over the method or during intellisense completion? – Fabio Sep 05 '20 at 09:26
  • Just in case: https://softwarerecs.stackexchange.com/a/265 – Fabio Sep 05 '20 at 09:28
  • @Fabio For the same reason that Oracle has made the export of Java documentation in html available: read the methods behaviour without open an IDE and create a separate documentation file useful in disparate cases! :) Thanks for your suggestion! I'm going to read your link! – Calaf Sep 05 '20 at 10:03
  • @Fabio: The generated documentation may be far more complex than what you see in VS Intellisense. It can contain pictures, tables, examples and links to related documents. That's exactly how MSDN documentation for the .NET framework works. Another case - the end users. What if you create a reusable component, control or an extensible system with well defined API that the end users can use. You need to provide a decent documentation for them. – Peter Macej Sep 05 '20 at 10:56
  • Does this answer your question? [Programmatically get Summary comments at runtime](https://stackoverflow.com/questions/15602606/programmatically-get-summary-comments-at-runtime) – Tom W Sep 05 '20 at 10:58
  • @TomW It's a totally different question... – Calaf Sep 05 '20 at 11:06
  • @PeterMacej, tables, pictures or examples are not generated automatically but added explicitly to the generated docs. That why many of MSDN examples looks silly (made by interns) ;) – Fabio Sep 05 '20 at 11:23
  • 1
    @Fabio That's right, but not always true. For example, VSdocman can read tag in XML comments and automatically generates a picture or class diagram. I think Sandcastle is able to do something similar. Other mentioned formatting is a part of standard XML comments so they are generated automatically as well. Tables , examples , , links and . See https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/recommended-tags-for-documentation-comments – Peter Macej Sep 05 '20 at 12:34

1 Answers1

1

There are several tools that can generate a documentation in HTML or other formats out of the XML comments. Some of them:

  • VSdocman - the tool for generating API documentation from C# and VB projects. It can generate multiple formats, including HTML, CHM, PDF, Docx and others. It also provides WYSIWYG XML comments editor in Visual Studio. It is a commercial product and I'm the author.
  • Sandcastle Help File Builder - a set of tools that are used to create help files for managed class libraries containing both conceptual and API reference topics. Free.
  • DocFX - An extensible and scalable static documentation generator. Free.
Peter Macej
  • 4,831
  • 22
  • 49