DotBook is a .NET CLI tool for human-friendly documentation generation from C# source files.
Currently supported formats are:
- Markdown (can be uploaded to Github Pages directly)
- HTML (suitable for offline browsing or iframe integration)
dotnet tool install -g DotBook
- Add the following item to your .csproj:
<ItemGroup>
<DotNetCliToolReference Include="DotBook" Version="0.5.5"/>
</ItemGroup>
- Run the
dotnet restore
command
Run dotnet doc
in the project folder to use default settings or dotnet doc --help
for help.
Tip: If you have a README.md or README.html (depending on the format) at the source root, it will be included at the index page before the API Documentation.
Option format: -option, --option
o, output
- Output directory for the generated documentation. If not specified, defaults to 'docs'.s, src
- Directory for C# code searchv, visibility
- Include types and members with the specified visibilities. Defaults to 'public'.h, use-hash
- Use hashing for documentation filenames to allow deep hierarchies. If false, uses escaped type/member name. Defaults to 'false'.f, format
- Sets the output format. Default is Markdown. Available formats: Markdown, Html?, help
- Displays the help message.
dotnet doc
dotnet doc --format html
dotnet doc --src /my-module --output /my-module-docs