For the last month, I was working on an imagery infrastructure library. Some of my effort was to well document each class, method and property so that the users of this library will have the privilege of knowing how to properly use it. During the development phase, I created a test project so I will be able to test my code at runtime. By the end of this month, I decided to separate the test project from the main solution and create a test solution. Surprisingly, when browsing the test code and hovering my library classes and methods, no comments appeared in the Visual Studio tooltip:

image

Those comments did appear when the test and the imagery infrastructure projects belonged to the same solution. In this article, I am going to explain why it is so important to generate XML documentation file for each one of your .Net projects.

 

As you may understand from the previous paragraph, the comments didn’t show up in the tooltip because of some settings in the csproj file. When creating a new project, the default setting is not to generate XML documentation. After I turned this feature on, the comments appeared and everything was fine (thanks to Eyal Tzuker, a coworker of mine):

xmldocumentation

image

Don’t forget to check this check box before releasing your code.

Tags :

3 Responses to “XML Documentation File For Your .Net Project – It’s Important”


  1. George M

    Said on November 18, 2008 :

    Thanks for the instructions on how to generate the xml file. But you really don’w explain why it’s important.

  2. Garry

    Said on November 20, 2008 :

    For those that use NAnt to do their build, you can also add the doc atrribute to the csc element like this:-

    This will generate the XML file based on your XML comments

1 Trackback(s)

  1. Mar 14, 2009: LINQ TO XML IN 3 EASY STEPS | Dev102.com

Post a Comment