Nullean.Snapshots.PublicApi
0.13.0
dotnet add package Nullean.Snapshots.PublicApi --version 0.13.0
NuGet\Install-Package Nullean.Snapshots.PublicApi -Version 0.13.0
<PackageReference Include="Nullean.Snapshots.PublicApi" Version="0.13.0" />
<PackageVersion Include="Nullean.Snapshots.PublicApi" Version="0.13.0" />
<PackageReference Include="Nullean.Snapshots.PublicApi" />
paket add Nullean.Snapshots.PublicApi --version 0.13.0
#r "nuget: Nullean.Snapshots.PublicApi, 0.13.0"
#:package Nullean.Snapshots.PublicApi@0.13.0
#addin nuget:?package=Nullean.Snapshots.PublicApi&version=0.13.0
#tool nuget:?package=Nullean.Snapshots.PublicApi&version=0.13.0
Nullean.Snapshots.PublicApi

Public API snapshots for Nullean.Snapshots: an assembly's public API stored as a .api file, C# one declaration per line, and every change reported by path with the version change it calls for, who it breaks and where in the verified file.
Install
dotnet add package Nullean.Snapshots.PublicApi
Quick start
using AwesomeAssertions;
using Nullean.Snapshots.PublicApi;
public class ApiTests
{
[Test]
public void Public_api_is_unchanged() => typeof(Widget).Assembly.Should().MatchApiSnapshot();
}
The first run writes ApiTests/Public_api_is_unchanged.received.api. Accept it, and from then on a change to the API fails the test until the new file is accepted:
Public API did not match snapshot: tests/Acme.Tests/.snapshots/ApiTests/Public_api_is_unchanged.verified.api
Suggested version change: Major (2 breaking)
2 difference(s):
Lib.Drawing › IShape › Resize(double) added void Resize(double factor) [major: breaks implementers, compiled code and source] (verified.api:4)
Lib.Drawing › Widget › Name(int) › parameter 1 name index → position [major: breaks callers, source only] (callers that pass it by name) (verified.api:12)
The verified file reads like the code:
assembly Lib
using interface System: IDisposable
namespace Lib.Drawing
interface IShape : IDisposable
double Area { get; }
void Draw()
class Widget : IShape
Widget(string name)
double Area { get; }
void Draw()
string Name(int index)
Options
split: ApiSplit.Namespace(orTopLevelNamespace) keeps a snapshot per namespace, named after it, for a large assembly.comparison: new ApiComparisonOptions { NotExtensionPoints = ["Lib.Internal.*"] }names types nobody outside implements or derives from: a change that only breaks their implementers is listed but does not ask for a major version. A type with an attribute namedInternalImplementationOnlyAttributecounts as one too.
The reading, writing and comparing come from Nullean.PublicApi and Nullean.PublicApi.Diff, the engine of assembly-differ, whose api --verify checks the same files from a build.
| 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. |
-
net10.0
- Nullean.PublicApi.Diff (>= 1.1.0)
- Nullean.Snapshots (>= 0.13.0)
- Nullean.Snapshots.AwesomeAssertions (>= 0.13.0)
-
net11.0
- Nullean.PublicApi.Diff (>= 1.1.0)
- Nullean.Snapshots (>= 0.13.0)
- Nullean.Snapshots.AwesomeAssertions (>= 0.13.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.13.0 | 0 | 11/14/2026 |