Question

I'd like to have a single command to auto-linewrap the XML-style comments in .NET.

Example:

/// <summary>
/// This comment line should be
/// on one line, and other lines in this <summary> block should be wordwrapped.
/// </summary>

I wouldn't mind buying some of the commercial Visual Studio plugins, if they are capable of doing this.

Was it helpful?

Solution

I've written an addin for Visual Studio, AtomineerUtils Pro Documentation which will update and word-wrap both normal comments and documentation comments (in XML, Doxygen, Qt and JavaDoc formats). (It's not free, but it's very inexpensive and there's a 30 day free trial)

It tries to intelligently preserve important newlines - text such as indentation, bullet lists, blank lines or a double space at the end of a line (among other things) will all be used as hints to the wrapping engine to ensure that your formatting is not lost.

OTHER TIPS

Try the trial of ReSharper, it states it formats XML Doc Comments (Go Here and search for XML doc comments for more information) and tends to be very customisable.

If that doesn't work, the closest thing I could find was on CodeProject , it's intended for Visual Studio 2003; however is open source so you may be able to get it working without the expensive of a third party plugin.

Add a <para /> in your comments

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top