Visual Studio XML Documentation: Introduction

Writing code documentation has always been a time consuming process. Additionally, reflecting code changes in the already finished documentation proved to be even more time consuming.

Since the beginning of time, code documentation existed only inside the code itself in the form of the in-line comments. However, modern programming languages introduced syntax for the in-line code comments (XML documentation syntax) and brought the capability of generating the external humanly-readable code documentation from these comments.

Visual Studio has a fully integrated support for the XML documentation. In order to use it inside your .NET project you need to enable it on the Build tab of the Properties page of the project.

Build XML Documentation

Once you build the project with the XML documentation option enabled, a list of warnings will be populated with the additional warnings informing you about the missing XML comments.

XML Error List

You can remove these warnings by simply adding the XML comments to each of the publicly visible types from the list. To add XML comment to the publicly visible type, simply type /// on top of it. Visual Studio will automatically generate the required XML comment syntax and all that is left for you to do is to describe it.

XML Comment Syntax

XML documentation supports a wide range of the XML tags used for formatting. I will describe these tags in detail in the second part of this post.

Tags: ,

One Response to “Visual Studio XML Documentation: Introduction”

  1. readable xml Says:

    [...] … presentations and spreadsheet files are readable even if they are created using …Visual Studio XML Documentation: Introduction | Development …Writing code documentation has always been a time consuming process. Additionally, reflecting code [...]

Leave a Reply