Over a million developers have joined DZone.

Code Documentation in .Net Projects

DZone's Guide to

Code Documentation in .Net Projects

· ·
Free Resource

Whether you are developing personal or enterprise applications, you must document from the smallest unit (methods) to the largest unit (libraries, modules, layers, etc.) of existing code. Preparing this document is an important factor in the adaptation of software engineers’ and projects’ future.

In general, we refrain from writing code descriptions in method level and prefer writing descriptions in class level. Sometimes we are even postponing it. In my post, we’ll try to obtain a code documentation file(.chm) or site(.html) gathered in one place for XML-based written descriptions inside visual studio. I will show you how it’s done with Sandcastle Help File Builder. This is a quite popular tool used in .net projects.

Installation: firstly we’re downloading setup file via link on codeplex page of Sandcastle Help File Builder tool. This setup file consist of more setup file and you will do a guided installation with it. You should pay attention each installation step and do installations one by one.

Now we finished the installation. We can create a operable code help file(.chm) on windows or web-based documentation. We can do this with Sandcastle Help File Builder GUI or Visual Studio Project Template. If you ask me, being via visual studio is much easier and it provide opportunity for some additional customizations. Also, all project components is so good being in a single vs solution.

Sandcastle Help File Builder GUI

Let’s create a sample project to create documentation file. I will create .html and .chm code doc. file for BugTracker that i coded project. Open you project and Add documentation project on solution in the way that you see below.

We must be insert doc. source in added doc. project. Namely we’ll add libraries(.dll) that we want to create document file on project. You can use in project’s properties for documentation project’s setting and changing output directories of it. In following the photo showing this case

Then build the project and Here’s doc. files created. You can see files in \Help directory and my created files in the links below:

Web-based documentation sample: http://doc.app.yemrekeskin.com

.Chm code documentation: http://doc.app.yemrekeskin.com/BugTracker.Doc.chm

Alternative tools:

That’s all from my article, so I hope this has been helpful.


Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}