views:

281

answers:

4

Which tools you use and why for automatic documentation / comments generation with Visual Studio

+1  A: 

StyleCop is a great tool from Microsoft for checking that comments exist for all of your code elements. The tool performs static analysis of your code to ensure that your code conforms to specific built-in or custom defined rules.

heavyd
StyleCop has nothing to do with automatic documentation / comments generation.
Bolek Tekielski
+7  A: 

GhostDoc for VS is a great tool. I use it with VS2005 and 2008. Works very well and best of all is free.

http://submain.com/products/ghostdoc.aspx

You can comment class members with a simple right-click context menu, amongst other things.

KP
I did not look into this much what was does it have over like just using xml comments(3 slashes to generate the structure)? Then using like sandcastle to make a doc file out of it.
chobo2
Normally when you type three slashes to generate the framework for you comments, you still need to type in details about the item, its properties, return types, etc. On the other hand GhostDoc will automatically create all of this for you, assuming you have a reasonable naming convention for your methods, parameters, etc. If your method name is GetUserNameBasedOnId Ghostdoc will create a description that says "Gets the user name based on Id." etc. etc. It will also pull base documentation for inherited classes, etc. etc. Doesn't replace Sandcastle or NDoc.NET on the help file side of things.
KP
+1  A: 

something with a solid preview and maybe even a WYSIWYG editor, some help if you want to embed an image or sample source code!

This is exactly where VSdocman can help you.

Peter Macej
A: 

I've written a free addin, AtomineerUtils - this is like GhostDoc, but much more powerful (gives better auto documentation, documents thrown exceptions automatically, word wraps the comments to keep them tidy, etc).

Jason Williams
Thanks mate, I'll have a look
Asad Butt