Over a million developers have joined DZone.

XML Documentation File For Your .Net Project - It’s Important

·

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:

[img_assist|nid=6025|title=|desc=|link=none|align=none|width=299|height=59]

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): 

[img_assist|nid=6026|title=|desc=|link=none|align=none|width=590|height=434]

[img_assist|nid=6027|title=|desc=|link=none|align=none|width=283|height=69]

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

Topics:

Published at DZone with permission of Shahar Yair. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}