Meziantou.Framework.PublicApiGenerator.Tool
2.0.27
Prefix Reserved
dotnet tool install --global Meziantou.Framework.PublicApiGenerator.Tool --version 2.0.27
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local Meziantou.Framework.PublicApiGenerator.Tool --version 2.0.27
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Meziantou.Framework.PublicApiGenerator.Tool&version=2.0.27
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package Meziantou.Framework.PublicApiGenerator.Tool --version 2.0.27
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.Framework.PublicApiGenerator.Tool
Meziantou.Framework.PublicApiGenerator.Tool is a CLI tool that reads a .NET .dll or .exe and generates compilable C# files describing its public API.
Install
dotnet tool install --global Meziantou.Framework.PublicApiGenerator.Tool
Example
Meziantou.Framework.PublicApiGenerator.Tool \
--input ./bin/Release/net10.0/MyLibrary.dll \
--output ./public-api \
--file-layout OneFilePerNamespace \
--omit-auto-generated-comment
Multi-target example:
Meziantou.Framework.PublicApiGenerator.Tool \
--input netstandard2.0=./bin/Release/netstandard2.0/MyLibrary.dll \
--input net10.0=./bin/Release/net10.0/MyLibrary.dll \
--output ./public-api \
--omit-auto-generated-comment
When using multiple --input values, you can use tfm=path to set the target framework explicitly, or use plain paths and let the tool infer target frameworks from assembly metadata (TargetFrameworkAttribute).
--output is the output directory option.
When using --file-layout SingleFile, you can use --output-file to set an explicit file path instead of generating <AssemblyName>.cs in the output directory.
Meziantou.Framework.PublicApiGenerator.Tool \
--input ./bin/Release/net10.0/MyLibrary.dll \
--output-file ./public-api/MyLibrary.PublicApi.cs \
--file-layout SingleFile
Use --verify-no-change to check that generated files are up to date without writing any file. This is useful in CI:
Meziantou.Framework.PublicApiGenerator.Tool \
--input ./bin/Release/net10.0/MyLibrary.dll \
--output-file ./public-api/MyLibrary.PublicApi.cs \
--file-layout SingleFile \
--verify-no-change
Example output
public-api/
Demo.g.cs
GlobalNamespace.g.cs
Help
Description:
Generate public API stubs from a .NET assembly.
Usage:
Meziantou.Framework.PublicApiGenerator.Tool [options]
Options:
--input <input> (REQUIRED) Assembly input. Use either 'path' or 'tfm=path'. Repeat for multi-target generation.
--output <output> Output directory
--output-file <output-file> Output file path when --file-layout is SingleFile
--file-layout <OneFilePerNamespace|OneFilePerType|SingleFile> File layout: SingleFile, OneFilePerNamespace, or OneFilePerType [default: SingleFile]
--omit-auto-generated-comment Omit the // <auto-generated/> comment from generated files
--include-assembly-references List the names of the referenced assemblies in the header of generated files. With a .deps.json file, the assemblies of the framework are not listed
--include-assembly-reference <include-assembly-reference> Pattern of the names of the framework assemblies to list with --include-assembly-references ('*' and '?' wildcards). Repeat for several patterns.
--exclude-assembly-reference <exclude-assembly-reference> Pattern of the names of the assemblies not to list with --include-assembly-references ('*' and '?' wildcards). Repeat for several patterns.
--include-all-attributes Write the attributes that are not written by default: EditorBrowsable, the attributes of other namespaces than System, and the assembly attributes
--delete-unexpected-files Delete the files of the --output directory that are not generated, such as the files of removed types. Only use it when the directory only contains the generated files
--verify-no-change Verify generated files are up to date without writing changes
-?, -h, --help Show help and usage information
--version Show version information
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.27 | 54 | 11/13/2026 |
| 2.0.26 | 52 | 11/13/2026 |
| 2.0.25 | 83 | 11/8/2026 |
| 2.0.24 | 92 | 11/5/2026 |
| 2.0.23 | 111 | 10/31/2026 |
| 2.0.22 | 156 | 10/29/2026 |
| 2.0.21 | 111 | 10/28/2026 |
| 2.0.20 | 111 | 10/24/2026 |
| 2.0.19 | 100 | 10/21/2026 |
| 2.0.18 | 107 | 10/14/2026 |
| 2.0.17 | 104 | 10/11/2026 |
| 2.0.16 | 106 | 10/9/2026 |
| 2.0.15 | 114 | 9/27/2026 |
| 2.0.14 | 121 | 9/20/2026 |
| 2.0.13 | 119 | 9/15/2026 |
| 2.0.12 | 127 | 9/13/2026 |
| 2.0.11 | 120 | 9/11/2026 |
| 2.0.10 | 138 | 9/9/2026 |
| 2.0.9 | 132 | 9/6/2026 |
| 2.0.8 | 130 | 9/3/2026 |
Loading failed