Invex.RepoUtils.Atom.Module
3.2.0
dotnet add package Invex.RepoUtils.Atom.Module --version 3.2.0
NuGet\Install-Package Invex.RepoUtils.Atom.Module -Version 3.2.0
<PackageReference Include="Invex.RepoUtils.Atom.Module" Version="3.2.0" />
<PackageVersion Include="Invex.RepoUtils.Atom.Module" Version="3.2.0" />
<PackageReference Include="Invex.RepoUtils.Atom.Module" />
paket add Invex.RepoUtils.Atom.Module --version 3.2.0
#r "nuget: Invex.RepoUtils.Atom.Module, 3.2.0"
#:package Invex.RepoUtils.Atom.Module@3.2.0
#addin nuget:?package=Invex.RepoUtils.Atom.Module&version=3.2.0
#tool nuget:?package=Invex.RepoUtils.Atom.Module&version=3.2.0
Invex .NET Repo Utils
Invex.RepoUtils bundles the tooling the Invex team uses to keep its .NET repositories consistent,
well-versioned and safe to release: a Roslyn analyzer that makes every public API exposure deliberate,
a test utility that snapshots the public API surface, and an Atom
build module that turns those snapshots into CI checks and automates PR and package housekeeping.
Packages
| Package | What it does | Targets |
|---|---|---|
Invex.RepoUtils.PublicApiAnalyzers |
Roslyn analyzer that flags public members not annotated as part of the public API surface. | netstandard2.0 |
Invex.RepoUtils.TestUtils |
Test utilities for snapshot-testing your assembly's public API surface. | netstandard2.0, net10.0, net11.0 |
Invex.RepoUtils.Atom.Module |
Atom build module with breaking-change, Dependabot, Copilot-review, DocFX and NuGet-cleanup building blocks. | net10.0, net11.0 |
Features
- Intentional public API. Rule
IPAA0001reports every effectively-public member that is not annotated with[PublicAPI]or another attribute you allow. - API surface snapshots.
PublicApiSurfaceTestUtil.GetPublicApiSurfaceserialises an assembly's public types and member names to JSON for approval testing with Verify. - Breaking-change gate. The
CheckPrForBreakingChangestarget diffs your API snapshot files against the latestv{semver}release and fails the PR check when the version bump is too small. - Dependabot auto-merge. The
ApproveDependabotPrtarget enables auto-merge on Dependabot pull requests with a dedicated PAT. - Wait for Copilot review. The
WaitForCopilotReviewtarget blocks until GitHub Copilot has finished reviewing a pull request. - DocFX and NuGet housekeeping. Helpers build, serve and publish a DocFX site to
gh-pagesand unlist superseded prerelease packages.
Installation
dotnet add package Invex.RepoUtils.PublicApiAnalyzers # in library projects
dotnet add package Invex.RepoUtils.TestUtils # in test projects
dotnet add package Invex.RepoUtils.Atom.Module # in your Atom build project (_atom)
Invex.RepoUtils.PublicApiAnalyzersis a development dependency (analyzer only) and adds no runtime assemblies. It recognisesPublicAPI/PublicAPIAttributeby name but does not ship the attribute: add JetBrains.Annotations or define an equivalent attribute.Invex.RepoUtils.TestUtilsdepends on JetBrains.Annotations (and System.Text.Json onnetstandard2.0). It returns a JSON string, so pair it with a snapshot library such as Verify.Invex.RepoUtils.Atom.Modulebuilds onInvex.Atom.Module.GitHubWorkflows,Invex.Atom.Module.DotnetandOctokit.GraphQL. Version 3 requires Atom 5 or later.
Quick start
Annotate your public API, then snapshot it in a test:
using JetBrains.Annotations;
// IPAA0001: Public member 'Unmarked' is missing [PublicAPI] or other valid attribute
public class Unmarked { }
// No diagnostic: the type and all its public members are part of the API surface.
[PublicAPI]
public class Marked
{
public int Value { get; set; }
}
using Invex.RepoUtils.TestUtils;
[TestFixture]
public class PublicApiTests
{
[Test]
public Task VerifyPublicApiSurface() =>
VerifyJson(PublicApiSurfaceTestUtil.GetPublicApiSurface(typeof(Marked).Assembly));
}
Commit the resulting *.verified.txt file so every API change shows up in review.
Usage
Configure the analyzer
Extend the attributes that satisfy IPAA0001 or change its severity in .editorconfig:
[*.cs]
dotnet_code_quality.Invex_RepoUtils_PublicApiAnalyzers_ValidPublicApiAttributes = Experimental, MyCompanyApi
dotnet_diagnostic.IPAA0001.severity = error
See Public API Analyzers and its rules and configuration pages.
Snapshot the public API surface
GetPublicApiSurface lists every top-level public type with its public member names, excluding accessors
and operators. The snapshot files double as the input to the breaking-change check.
See Test Utilities.
Gate pull requests on breaking changes
Add ICheckPrForBreakingChanges to your Atom build and point it at your snapshot files:
[BuildDefinition]
[GenerateEntryPoint]
internal interface IBuild : IWorkflowBuildDefinition, ICheckPrForBreakingChanges
{
IEnumerable<RootedPath> ICheckPrForBreakingChanges.BreakingChangeFilesToCheck =>
RootedFileSystem
.Directory
.GetFiles(RootedFileSystem.AtomRootDirectory / "tests", "*.verified.txt", SearchOption.AllDirectories)
.Select(RootedFileSystem.CreateRootedPath);
}
Removed lines count as major changes and added lines as minor changes; the target posts a pass/fail GitHub check run. See Breaking Change Detection.
Automate pull requests and releases
IApproveDependabotPr, IWaitForCopilotReview, IDocFxHelper and INugetPackageUnlistHelper cover
Dependabot auto-merge, waiting for Copilot, DocFX publishing and prerelease cleanup. See
Atom Build Module,
Targets and
Helpers.
Documentation
Full documentation: https://invex-games.github.io/dotnet-repo-utils/
| Guide | Contents |
|---|---|
| Introduction | What the packages are for, how they fit together, design principles |
| Getting Started | Install the packages and wire up the analyzer, snapshot test and CI check |
| Public API Analyzers | IPAA0001, its rules and .editorconfig configuration |
| Test Utilities | Snapshot-testing the public API surface |
| Atom Build Module | Targets, helpers, breaking-change detection, Dependabot auto-merge |
| Contributing | Repository layout, build and test, CI workflows, PR process |
| Versioning | GitVersion, commit prefixes, branches and releases |
Development
The repository requires the .NET 11 SDK (see global.json), plus the .NET 10 runtime (or SDK) for the net10.0 tests and build project. Tests run on net10.0 and net11.0.
dotnet build Invex.RepoUtils.slnx
dotnet test Invex.RepoUtils.slnx
Preview the documentation site with the Atom build definition:
atom BuildDocs
atom ServeDocs
# equivalently
dotnet run --project _atom/_atom.csproj -- ServeDocs
See Contributing for the repository layout, CI workflows and pull request process.
License
Licensed under the MIT License. Copyright © 2026 Invex Games.
| 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
- Invex.Atom.Module.Dotnet (>= 5.2.0)
- Invex.Atom.Module.GitHubWorkflows (>= 5.2.0)
- Octokit.GraphQL (>= 0.4.0-beta)
-
net11.0
- Invex.Atom.Module.Dotnet (>= 5.2.0)
- Invex.Atom.Module.GitHubWorkflows (>= 5.2.0)
- Octokit.GraphQL (>= 0.4.0-beta)
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 |
|---|---|---|
| 3.2.0 | 37 | 2026/11/11 |
| 3.1.0 | 63 | 2026/11/11 |
| 3.0.0 | 4,651 | 2026/10/22 |
| 2.1.0-rc.2 | 68 | 2026/10/16 |
| 2.0.0 | 1,972 | 2026/10/15 |
| 1.10.0-rc.16 | 62 | 2026/10/13 |