RefDocGen - Reference Documentation Generator for .NET

RefDocGen is a reference documentation generator for .NET.

Features

Demos

Installation

Prerequisites:

Install as a .NET global tool from NuGet:

dotnet tool install --global RefDocGen

This makes the refdocgen command available on the command line.

Usage

Prerequisites

Before generating documentation, it is necessary to build the project/solution in Debug configuration. The following MSBuild properties must be set:

Ideally, specify these properties on the command line, as follows:

dotnet build -p:GenerateDocumentationFile=true -p:CopyLocalLockFileAssemblies=true

It is also possible to set them in the project file or in the Directory.Build.props.

Important: RefDocGen doesn't support .NET Framework projects.

Running

Run the following command to generate reference documentation:

refdocgen INPUT [OPTIONS]

The only mandatory argument is the INPUT - an assembly/project/solution to document, or a YAML configuration file (further explained below).

Examples

refdocgen MyLibrary.dll
refdocgen MyLibrary.csproj
refdocgen MyLibrary.sln

Configuration

Limitations

Default UI languages

While RefDocGen supports programs written in any .NET language, the default UI displays type and member signatures only in C# syntax. However, the default UI is designed to be extensible, so adding support for other languages, such as F#, is possible in the future.

Supported modifiers

RefDocGen recognizes most of the C# modifiers and displays them. However, some modifiers are not supported and therefore do not appear in the generated documentation.
These are typically implementation details that do not affect the public API.

More specifically, the following modifiers are not supported: extern, file, managed, new, partial, record, scoped, unmanaged, unsafe, volatile.

Additionally, these type parameter constraints are not supported: notnull, unmanaged, default, allows ref struct.

Non-nullable reference types

Currently, RefDocGen doesn't differentiate between nullable non-nullable reference types.