Library

edit

The Meziantou.Framework.PublicApiGenerator package is the library the MSBuild package and the tool are built on. Use it directly to generate the API files from your own code, or to inspect a public API without generating files: list the types and members of an assembly, find a symbol by its documentation ID, compare the builds of several target frameworks, or format declarations for a documentation site.

dotnet package add Meziantou.Framework.PublicApiGenerator

All the types are in the Meziantou.Framework.PublicApiGenerator namespace; the examples of these pages omit the using directive.

The entry point is the static PublicApi class:

MethodReturns
PublicApi.GenerateThe API files, in memory.
PublicApi.GenerateToDirectoryNothing: it writes the API files to a directory.
PublicApi.ReadAssemblyA PublicApiAssembly: the model of the public API of one assembly.
PublicApi.AggregateA PublicApiAggregatedAssembly: the models of the builds of an assembly for several target frameworks, combined.

PublicApiFormatter formats the symbols of the model as C# declarations.

Pages of this group