38
5
I'm currently working on a C# project and VisualAssist generates these fancy
/// <summary></summary> comments for me and I've been using them do document my code.
I assume there must be a way to use these comments to create HTML documentation like those done by Doxygen or Javadoc. How do I do that?
closed as off-topic by Mogsdad, EJoshuaS, Grr, Brian, Wonko the Sane Jan 16 at 21:20
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – Mogsdad, EJoshuaS, Grr, Brian, Wonko the Sane
- Doxygen also works for C#. What's wrong with it? – Etan Mar 9 '13 at 22:04
- But Doxygen uses different syntax. Since Visual Assist already generates these comments for me I'd rather use them. Edit: actually maybe it supports xml as well, I'll give it a go. – jaho Mar 9 '13 at 22:07
32
Doxygen or Sandcastle help file builder are the primary tools that will extract XML documentation into HTML (and other forms) of external documentation.
Note that you can combine these documentation exporters with documentation generators - as you've discovered, Resharper has some rudimentary helpers, but there are also much more advanced tools to do this specific task, such as GhostDoc (for C#/VB code with XML documentation) or my addin Atomineer Pro Documentation (for C#, C++/CLI, C++, C, VB, Java, JavaScript, TypeScript, JScript, PHP, Unrealscript code containing XML, Doxygen, JavaDoc or Qt documentation).
12
In 2017, the thing closest to Javadoc would probably DocFx which was developed by Microsoft and comes as a Commmand-Line-Tool as well as a VS2017 plugin.
It's still a little rough around the edges but it looks promising.
Another alternative would be Wyam which has a documentation recipe suitable for net aplications. Look at the cake documentation for an example.
- Docfx worked perfectly for me. I does work for VS2015 as well - just add nuget package
docfx.console. – Anton Krouglov Jul 21 '17 at 8:21 - The most voted answer is from 2009, but today (2017) I would say docfx is the best way to go. – Nikolaos Georgiou Aug 3 '17 at 5:57
- DocFX has unfortunately the big disadvantage, that it focuses only on documentation ofr the public. So if you want to do some documentation for internal use, which also includes access modifiers "internal" or "private", it is absolute useless. Sure... you have the opportunity to modify the code by yourself and fix this. See: github.com/dotnet/docfx/issues/836 – Onsokumaru Dec 21 '17 at 13:28
1
This page might interest you: http://msdn.microsoft.com/en-us/magazine/dd722812.aspx
You can generate the XML documentation file using either the command-line compiler or through the Visual Studio interface. If you are compiling with the command-line compiler, use options /doc or /doc+. That will generate an XML file by the same name and in the same path as the assembly. To specify a different file name, use /doc:file.If you are using the Visual Studio interface, there's a setting that controls whether the XML documentation file is generated. To set it, double-click My Project in Solution Explorer to open the Project Designer. Navigate to the Compile tab. Find "Generate XML documentation file" at the bottom of the window, and make sure it is checked. By default this setting is on. It generates an XML file using the same name and path as the assembly.
- 10He's not asking how to generate the XML documentation, he's asking how to turn that XML documentation into HTML. – Mark May 13 '15 at 20:59
- 9While your answer doesn't answer the OP's question, it answers mine. Thanks! – Tony Vitabile Jun 4 '15 at 16:29
0
The above method for Visual Studio didn't seem to apply to Visual Studio 2013, but I was able to find the described checkbox using the Project Menu and selecting my project (probably the last item on the submenu) to get to the dialog with the checkbox (on the Build tab).