My work version of Visual Studio 2010 doesn't seem to generate XML commentary for me while coding in C# and typing ///. Yet, my Visual Studio 2010 at home does this just fine, as does the version of Visual Studio 2008 I have at work.
I have searched for the option to enable these XML comments both locally and online to no avail. Can anyone please tell me where I can toggle whether the /// XML comments are enabled? Thank you.
To insert XML comments for a code element Do one of the following: Type /// in C#, or ''' in Visual Basic. From the Edit menu, choose IntelliSense > Insert Comment. From the right-click or context menu on or just above the code element, choose Snippet > Insert Comment.
Triple-slash directives are single-line comments containing a single XML tag. The contents of the comment are used as compiler directives. Triple-slash directives are only valid at the top of their containing file.
C# documentation comments use XML elements to define the structure of the output documentation. One consequence of this feature is that you can add any valid XML in your documentation comments. The C# compiler copies these elements into the output XML file.
The syntax for adding XML comments in your code is triple slashes /// followed by one of the supported XML tags.
There's an option in the Text Editor section of Tools, Options... called "Generate XML documentation comments for ///".
Tools → Properties → Text Editor → C# → Advanced.
Tick the checkbox next to Generate XML documentation comments for ///
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With