A tool that converts .NET metadata and XML documentation to markdown files.

I was very inspired by mdBook and wanted something similar to generate documentation to the game engine I am working on. I was aware that C# can generate XML files from documentation comments, so I thought about leveraging both of these.

Of course, I went from a straighforward XML to markdown generator to a tool that extracts metadata information of all public types exposed by a target assembly. You can find the source code here or even try it out.

Deploying mdBook after generating the markdown files.

The general structure of the files is:

└── src
    └── <AssemblyName>
        ├── <ClassName>.md
        └── <NamespaceName>
            └── <ClassWithinNamespaceName>.md

I did a lot of things that I am particularly proud here:

  • “Decompile” the members signature to display code in the documentation.
  • Link to an external documentation source. So far, I support MonoGame and Microsoft documentation websites.
  • Link to other members within the same assembly at the documentation.
  • Automatically generate files for mdBook.
  • Enabled GitHub Actions to automatically generate release binaries.

Anyway! I can’t wait to actually release the engine and its documentation powered by this tool.

Tool that converts .NET metadata and XML documentation to markdown files.

By Isadora, 2022-09-29