9

Does Visual Studio have an option to generate html documentation for Javadoc-style comments? If so, what steps are necessary to accomplish this?

In BlueJ there is an option to translate Javadoc-style comments into an html file.

Like the following picture shows for Java using BlueJ I want to do the same with Visual Studio : http://www.time-tripper.com/uipatterns/Patterns/Titled_Sections/javadoc.gif
(source: time-tripper.com)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Brandon Tiqui
  • 1,429
  • 3
  • 17
  • 35

2 Answers2

9

Do you actually mean JavaDoc, in Java? If so, I don't believe so - just use javadoc itself. Visual Studio doesn't really support Java.

If you mean C# XML documentation comments, then you can change the project properties to build the XML file, and then use NDoc (discontinued) or Sandcastle to build HTML (or chm etc). It's not as easy as it might be, admittedly.

EDIT: If you're using C++, you should probably look at Doxygen. There may be Visual Studio plugins, but you may be best off just running Doxygen as part of your build process. If you're using C++/CLI there may be some equivalent of C# XML comments, but I don't know of it.

albert
  • 8,285
  • 3
  • 19
  • 32
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • With Sandcastle I found it horrible to use. It takes literally seven complex steps to generate the documentation. However there is a project (I cannot rememnber the name now, Google will know) which builds SandCastle around a GUI and makes it nice and easy to use. You can plug it in part of your build process too – Finglas Dec 20 '09 at 10:50
  • Upvoting your answer, I will remove mine. I misunderstood the question. :) – GrayWizardx Dec 20 '09 at 19:59
  • 4
    Perhaps the Sandcastle Help File Builder: http://www.codeplex.com/SHFB ... it seems to be a front end for Sandcastle. – ChrisW Jan 06 '10 at 20:00
  • 1
    As Chris mentioned, Sandcastle Help File Builder makes generation of documentation very easy. – Tejasvi Hegde Jul 12 '14 at 08:38
1

You can use a Javadoc-compatible commenting style, either entering the comments by hand, or use my addin, Atomineer Pro Documentation to take most of the work out of it. Then to generate external documentation, use doxygen, which reads javadoc happily.

The alternative is (as Jon has said) to use XmlDoc format comments, which can be used by Visual Studio (for intellisense tooltips), Atomineer, Sandcastle and Doxygen. It's a less human-readable format, but gives you significant advantages within the Visual Studio environment, so it's a bit more flexible.

Both approaches will work for C#, C++, C (although C# works better on the intellisense side of things)

Jason Williams
  • 56,972
  • 11
  • 108
  • 137