Invex.RepoUtils.Atom.Module
2.0.0
dotnet add package Invex.RepoUtils.Atom.Module --version 2.0.0
NuGet\Install-Package Invex.RepoUtils.Atom.Module -Version 2.0.0
<PackageReference Include="Invex.RepoUtils.Atom.Module" Version="2.0.0" />
<PackageVersion Include="Invex.RepoUtils.Atom.Module" Version="2.0.0" />
<PackageReference Include="Invex.RepoUtils.Atom.Module" />
paket add Invex.RepoUtils.Atom.Module --version 2.0.0
#r "nuget: Invex.RepoUtils.Atom.Module, 2.0.0"
#:package Invex.RepoUtils.Atom.Module@2.0.0
#addin nuget:?package=Invex.RepoUtils.Atom.Module&version=2.0.0
#tool nuget:?package=Invex.RepoUtils.Atom.Module&version=2.0.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 |
Invex.RepoUtils.Atom.Module |
Atom build module with breaking-change, Dependabot, Copilot-review, DocFX and NuGet-cleanup building blocks. | net10.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 2 requires Atom 4 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 10 SDK (see global.json).
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. |
-
net10.0
- Invex.Atom.Module.Dotnet (>= 4.0.0)
- Invex.Atom.Module.GitHubWorkflows (>= 4.0.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 |
|---|---|---|
| 2.0.0 | 236 | 10/15/2026 |
| 1.10.0-rc.16 | 45 | 10/13/2026 |
| 1.9.0 | 6,131 | 8/3/2026 |
| 1.8.0 | 1,607 | 7/21/2026 |
| 1.8.0-rc.4 | 72 | 7/21/2026 |
| 1.7.0 | 934 | 7/13/2026 |