XML Documentation File For Your .Net Project - It’s Important
Join the DZone community and get the full member experience.Join For Free
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 tooltip:
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):
Don’t forget to check this check box before releasing your code.
Published at DZone with permission of Shahar Yair. See the original article here.
Opinions expressed by DZone contributors are their own.