"... and no one shall work for money, and no one shall work for fame; But each for the joy of the working, and each, in his separate star, shall draw the thing as he sees it, for the god of things as they are"



CSharp to HTML Converter


As much as I try to do physical hardware type projects (and I do) much of my work ends up being largely software. Since the software is open source, I thought that it would also be nice to be able to display the source code as browsable web pages as well as offering it for download. Besides a being a useful feature, having browsable HTMLized source code would also enable search engines to index it. This will be particularly useful for situations in which people interested in examples of a library functions use (even if they are not interested in the project itself) will be able to find it via search based on the names of specific functions and classes.

Turns out there is not a lot of free and open software out there which will convert CSharp solutions, projects and source code into displayable nicely formatted HTML. Jean-Claude Manolis web based CSharp to HTML converter is one of the best. However, it is only designed to convert single .cs files. I wanted something that could read a solution and output an entire browsable tree of source code files. Rather than re-invent the wheel, I wrote an application which wraps Jean-Claude's formatting engine (he open sourced the code - thank you Jean-Claude) so that it can consume Visual Studio solutions and projects and output them all as an interlinked set of documentation pages.

The CoDocker Software

The CoDocker software is intended to generate browser viewable HTML from the solutions, projects and source code files created by the Microsoft Visual Studio CSharp software. The resulting web pages make the source code content available for reference and documentation purposes. An example of the CoDocker output can be found by viewing the CoDocker source code web pages - these were produced using CoDocker. The CoDocker software is both free and open source and is released under the terms of the MIT License.


What CoDocker Does Not Do

The CoDocker software does not perform full syntax highlighting and cross referencing yet. For example in Visual Studio IDE, a class name used in a variable declaration will be appear in a light blue font and it is possible to jump to the definition using a mouse click. CoDocker cannot do this yet. Also CoDocker is purely for CSharp code. It does not support Visual Basic, C++ or any other code type. Sorry about that.

Style Sheets

The visual look and feel of the output HTML web pages can be changed by supplying a user defined stylesheet. The default stylesheet is pretty simplistic. If you make up a nice stylesheet you would like to share feel free to send it in. I am willing to maintain a collection of these and offer them for general download. The link will appear in this section should I get any.

Help Files and Manual

The Help Page discusses the usage of the CoDocker software and what all the configuration items do. The CoDocker software zip file (below) also contains these help files.


This software is offered as a binary and with source code under the terms of the the MIT License.



As discussed, at the top of this page, Jean-Claude Manolis web based CSharp to HTML converter formed the main formatting engine for the CoDocker software. The sections of the source code which are Jean-Claudes contribution have been clearly documented and annotated in the source code comments.

The icon used for the CoDocker app is "Swan" part of the lovely Glass Zoo set by sirea.


The CoDocker Main Form


An example of CoDocker CSharp Source Code Converted to HTML