Home > .Net > Documenting your code and Using Visual Studio IntelliSense tool

Documenting your code and Using Visual Studio IntelliSense tool

One of useful tools in any IDE that you developing at its ability to document your code with nice XML format. I will focus on VS2010 this is main tool that we are using at our development process.

There are some external tools that help and trying to automate documentation process, tools like GhostDoc. Of cause those tools can’t replace the programmer notes.

So when our code documented with Xml Documentation /// IDE ItelliSense uses this information in order to display this info about Class, method, Property and Data Member see following print screen from one of the System diagnostic classes.


All this behavior occurs only inside of Solution bounds, if we will use Assembly from different Solution ItelliSense won’t be able to display XML documentation because it’s not saved as part of Assembly.

In order to allow our documentation also in other Solutions, we need to define in Visual Studio to export XML file with all xml Documentation. Enter project Propertiesà Build Tab and select following checkbox.

Properties example

From now on every compilation xml file will be created with all developer documentation. This xml documentation file we will distribute with our Assembly, such behavior will allow to display our Classes, methods etc documentations when another developer will use them.

After recompiling the project we will get lots of new Warnings. All those Warnings appeared because after checking “XML documentation file” compiler obliging to document every Public method inside your Assembly. The most important Public methods you should document, but there is possibility to add these Warnings to Suppress Warnings list as Warning (1591), they won’t appear and annoy you output.

Categories: .Net Tags:
  1. No comments yet.
  1. No trackbacks yet.