VSDocMan review–Auto generate VS Help | Raffaeu’s blog

In these days I have been busy in the office by implementing a mechanism of C.I. (Continuous Integration) by releasing some facilities assemblies so that the developers that are working with me will be able to work always with the latest version of a specific .dll.

One of the most important thing I noticed when you work with a third-party or a legacy .dll is the documentation needed within the code. If you think for a moment on what you do when you work with .NET Framework, every time you do not know how to use a specific component or a specific class, you simply type www.msdn.com and you start to search in the help directory for some sample code or for a documentation.

The same important thing has to be done when you work with a third-party component or simply when you are in charge of releasing a facility assembly/framework like I do in my office.

Before showing you what I have found over the internet to solve the problem of generating the documentation, I want to explain you a little bit how the Visual Studio documentation system works.

Visual Studio documentation mechanism

One of the features included in Visual Studio, since one of the first version (maybe 2003/2005?) is the XML embedded documentation that allows you to write documentation in an XML format like the following example:

Sample documented Class
  1. /// <summary>
  2. /// Class level summary documentation goes here.</summary>
  3. /// <remarks>
  4. /// Longer comments can be associated with a type or member
  5. /// through the remarks tag</remarks>
  6. public class TestClass
  7. {
  8.     /// <summary>
  9.     /// Store for the name property</summary>
  10.     private string _name = null;
  11.     /// <summary>
  12.     /// The class constructor. </summary>
  13.     public TestClass()
  14.     {
  15.         // TODO: Add Constructor Logic here
  16.     }
  17.     /// <summary>
  18.     /// Name property </summary>
  19.     /// <value>
  20.     /// A value tag is used to describe the property value</value>
  21.     public string Name
  22.     {
  23.         get
  24.         {
  25.             if (_name == null)
  26.             {
  27.                 throw new System.Exception(“Name is null”);
  28.             }
  29.             return _name;
  30.         }
  31.     }
  32.     /// <summary>
  33.     /// Description for SomeMethod.</summary>
  34.     /// <param name=”s”> Parameter description for s goes here</param>
  35.     /// <seealso cref=”System.String”>
  36.     /// You can use the cref attribute on any tag to reference a type or member
  37.     /// and the compiler will check that the reference exists. </seealso>
  38.     public void SomeMethod(string s)
  39.     {
  40.     }
  41.     /// <summary>
  42.     /// Some other method. </summary>
  43.     /// <returns>
  44.     /// Return results are described through the returns tag.</returns>
  45.     /// <seealso cref=”SomeMethod(string)”>
  46.     /// Notice the use of the cref attribute to reference a specific method </seealso>
  47.     public int SomeOtherMethod()
  48.     {
  49.         return 0;
  50.     }
  51.     /// <summary>
  52.     /// The entry point for the application.
  53.     /// </summary>
  54.     /// <param name=”args”> A list of command line arguments</param>
  55.     static int Main(System.String[] args)
  56.     {
  57.         // TODO: Add code to start application here
  58.         return 0;
  59.     }
  60. }

By using this documentation technique you are giving to your code an additional immeasurable value; especially if you work with some Visual Studio plugin like Resharper, for example, you will come up with a nice and well formatted intellisense suggestion if you decorate the code in this way.


If you want to learn more about it, MSDN offers a great section about the XML documentation in Visual Studio 2010 and how it should be used.


This is a great article that gives you a full overview of this technology: http://msdn.microsoft.com/en-us/magazine/cc302121.aspx

Documentation with VSDocMan

Last week, after I started working on this C.I. project I just realized that now, more than everything, the other guys that will use my code will need tons of documentation in order to understand how to use my toolkits an facilities. Well I do not want to “blown my own trumpet” but I can easily say that I usually document whatever I write and that I use a lot Resharper and StyleCop to make my code readable and uniform. Unfortunately I am very allergic to .chm files in general.

I have this tool that is called VsDocMan my lifeline and I want to show you how it works; trust me it is simply AWESOME! Hot smile

First of all you can generate VS documentation with a simple Click on the toolbar or in the context menu; in fact VSDocMan allows you to self-document your classes with some pre-defined XML schemas


Another interesting feature is the Comment Editor command, with this command VSDocMan will show you an interactive MSDN style documentation of how the final doc will look like so that you can easily change your documentation structure in a WYSIWYG editor without the need of struggling with the ugly XML


Plus it allows you to generate a dynamic class diagram that is clickable and that points to the corresponding documentation file!

VSDOCMan generates a lot of different documentations: .chm, MSDN style, MSDN V2, HTML, a full MSDN HTML web site and much more. It is very cheap in my opinion for what it does and if you are looking for a professional and fully working solution to generate documentation from your code, you should seriously consider to spend some time and money on this AWESOME product.

Leave a comment

Your email address will not be published. Required fields are marked *