Problem solve Get help with specific problems with your technologies, process and projects.

XML documentation in Visual Basic.NET applications

Thanks to a free plug-in, those working with VB.NET don't have to envy their counterparts who work in C#, when it comes to XML documentation.

XML-based code document generation comes as part of Visual Studio .NET 2003 -- at least for applications developed using C#.NET. Thanks to a free plug-in called the VBCommenter PowerToy (a paltry 307KB download that's readily available from the Got Dot Net Web site), those working with VB.NET don't have to envy their counterparts who work in C#. Using the VBCommenter plug-in, they can create XML documentation as they are writing code.

To use this facility, it's first necessary to install VBCommenter. The download is a ZIP file that includes a standard Setup.exe file with an accompanying .msi file; it's trivial to unpack and install and should take no more than two minutes. Configure VBCommenter settings from the Tools VBCommenter Options menu. Here, make sure the checkboxes for both "Create .xml files when projects are built" and "Insert XML comments in source" are checked. You can also change the comment prefix that invokes this tool from its default of three apostrophes (but be sure to pick something that's not part of basic VB syntax).

Once the plug-in is running and configured, simply key three apostrophes into the Start Page for any class definition, property, member variable, or method. Based on the configuration settings described in the preceding paragraph, this automatically generates an XML template inside which you can add your comments and use any of the MSDN documentation tags available to explain how the code works and behaves.

Because documenting as you go is the best way to make sure all the nuances of the code are captured, this technique (and the VBCommenter tool) are highly recommended for those seeking an easy way to add structured documentation to their work.


Dig Deeper on .NET Framework development with XML and XAML

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close