RefDocGen is a reference documentation generator for .NET.
inheritdoc
tagsNewtonsoft.JSON
YamlDotNet
Serilog
Prerequisites:
Install as a .NET global tool from NuGet:
dotnet tool install --global RefDocGen
This makes the refdocgen
command available on the command line.
Before generating documentation, it is necessary to build the project/solution in Debug configuration. The following MSBuild properties must be set:
GenerateDocumentationFile=true
- creates the XML file with documentationCopyLocalLockFileAssemblies=true
- ensures all dependencies are copied to the output folderIdeally, 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.
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).
refdocgen MyLibrary.dll
refdocgen MyLibrary.csproj
refdocgen MyLibrary.sln
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.
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
.
Currently, RefDocGen doesn't differentiate between nullable non-nullable reference types.