Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Intellisense for cref's in Xml Documentation

When you create XML Documentation for C# methods in Visual Studio (I'm using 2010), you receive Intellisense support for creating the various XML tags, such as see, paramref, etc. On the other hand, when you add in a a cref attribute you have to use a, what I think is convoluted format to describe types. This is worst when you have a number of generics.

What I'm looking for is as follows. If you're setting the cref attribute in a see element, you have an Intellisense list of classes that match what you're typed in so far and then output the proper type description necessary. Or when you're setting the cref attribute on a paramref element, you receive the list of parameters of that method.

Does anyone know of some sort of addon to Visual Studio to provides Intellisense for these cref attributes?

like image 600
wwahammy Avatar asked Jul 15 '11 11:07

wwahammy


1 Answers

I've been writing a lot of XML documentation recently, and I think ReSharper provides the functionality you're looking for with its Extended IntelliSense Code Completion feature - I use it all the time. The Quick Documentation feature is not to be overlooked when writing documentation either - with it, you can see what the XML documentation will actually look like when compiled to html/chm, and it's updated in real time, so if I change something in the docs with the Quick Documentation window up, I see it change automatically - really helpful for formatting and such.

If you add Agent Smith to the mix (which only works as an add-on to ReSharper, apparently), it can add some handy Spell Checking, XML Comment Validation, Naming Convention checks, and some simple comment-reflowing (if you're particular about staying within a certain number of characters/line) (with the first two probably being the most useful as ReSharper provides the ability to enforce Naming Conventions).

Hope that helps!

like image 142
johnny Avatar answered Nov 07 '22 13:11

johnny