Xml2Doc.Cli
2.2.0
See the version list below for details.
dotnet tool install --global Xml2Doc.Cli --version 2.2.0
dotnet new tool-manifest
dotnet tool install --local Xml2Doc.Cli --version 2.2.0
#tool dotnet:?package=Xml2Doc.Cli&version=2.2.0
nuke :add-package Xml2Doc.Cli --version 2.2.0
Xml2Doc.Cli
Command-line interface for Xml2Doc, part of the mod-posh organization.
Overview
Xml2Doc.Cli converts C# XML documentation into Markdown using the Xml2Doc.Core engine.
It’s ideal for developers and CI systems that want quick, repeatable Markdown docs from existing XML output.
Target Frameworks (multi-TFM)
The CLI is multi-targeted and ships for:
net8.0net9.0
The rendered Markdown is identical across these TFMs. Choose whichever runtime you have available on the machine that runs the tool.
Running the CLI (pick one TFM)
Build first, then run the produced DLL for the desired framework:
# Build both TFMs (default for the project)
dotnet build Xml2Doc/src/Xml2Doc.Cli/Xml2Doc.Cli.csproj -c Release
# Run the built artifact (net8.0)
dotnet Xml2Doc/src/Xml2Doc.Cli/bin/Release/net8.0/Xml2Doc.Cli.dll --xml path\to\MyLib.xml --out .\docs
# Or run the net9.0 artifact
dotnet Xml2Doc/src/Xml2Doc.Cli/bin/Release/net9.0/Xml2Doc.Cli.dll --xml path\to\MyLib.xml --out .\docs
Tip: Prefer running the built DLL as shown above. Using
dotnet runcan be confusing with multi-targeted projects; if you do use it, you must specify a single--frameworkthat exists in the csproj.
Usage
# Per-type documentation
Xml2Doc.exe --xml .\bin\Release\net9.0\MyLib.xml --out .\docs
# Single combined file
Xml2Doc.exe --xml .\bin\Release\net9.0\MyLib.xml --out .\docs\api.md --single --file-names clean
Options
| Option | Description |
|---|---|
--xml <path> |
Path to the XML documentation file |
--out <path> |
Output directory (multi-file) or output file (single-file) |
--single |
Combine all documentation into a single Markdown file |
--file-names <verbatim\|clean> |
Filename mode — preserve generics or shorten to readable form |
--rootns <namespace> |
Optional root namespace to trim |
--lang <language> |
Code block language (default: csharp) |
--config <file> |
Path to a JSON configuration file |
--prune-stale |
Remove stale files previously owned by this invocation |
--manifest-id <identity> |
Stable ownership identity required with --prune-stale |
--line-endings <style> |
Markdown newlines: lf (default), crlf, or native |
--help |
Display help text |
Example Config File
xml2doc.json
{
"Xml": "src/MyLib/bin/Release/net9.0/MyLib.xml",
"Out": "docs/api.md",
"Single": true,
"FileNames": "clean",
"RootNamespace": "MyCompany.MyProduct",
"CodeLanguage": "csharp"
}
For safe stale-output pruning in directory mode, opt in with a stable identity:
Xml2Doc.exe --xml .\bin\Release\net9.0\MyLib.xml --out .\docs \
--prune-stale --manifest-id MyCompany.MyLib
Only files recorded in the manifest for that exact identity can be removed. Untracked files and
files owned by other identities are preserved. Pruning is not available with --single.
Run with:
Xml2Doc.exe --config xml2doc.json
CLI flags always override values from the config file.
Generated Markdown uses LF on every platform by default. Use --line-endings crlf only when a
consumer requires CRLF, or --line-endings native for host-specific compatibility. A
.gitattributes rule such as *.md text eol=lf can reinforce repository policy, but is not required
for deterministic Xml2Doc output.
Notes for CI
- Build once (
dotnet build -c Release), then run the desired built CLI DLL (net8.0 or net9.0). - Output is deterministic across TFMs, so your pipelines can choose the runtime that’s already available.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.4.0 | 54 | 9/1/2026 |
| 2.3.1 | 89 | 8/30/2026 |
| 2.3.0 | 118 | 8/17/2026 |
| 2.2.0 | 104 | 8/17/2026 |
| 2.1.0 | 108 | 8/16/2026 |
| 2.0.3 | 96 | 8/15/2026 |
| 2.0.2 | 103 | 8/14/2026 |
| 2.0.1 | 91 | 8/14/2026 |
| 2.0.0 | 101 | 8/13/2026 |
| 2.0.0-preview.113-g69c1a44 | 51 | 8/13/2026 |
| 1.4.0 | 87 | 8/13/2026 |
| 1.4.0-preview.111-g7a5369b | 64 | 8/13/2026 |
| 1.4.0-preview.110-g1edd8f0 | 65 | 8/13/2026 |
| 1.4.0-preview.109-g42abc6e | 64 | 8/13/2026 |
| 1.4.0-preview.108-g611e3f5 | 57 | 8/13/2026 |
| 1.4.0-preview.107-gc4dc99b | 58 | 8/13/2026 |
| 1.4.0-preview.106-gffe4bab | 68 | 8/13/2026 |
| 1.4.0-preview.105-gd9e6cf3 | 60 | 8/13/2026 |
| 1.4.0-preview.104-gfa11148 | 56 | 8/13/2026 |
| 1.4.0-preview.103-gc413f43 | 54 | 8/13/2026 |