Skip to content
BETAGuardrails are in beta. The library, the configuration format and the CLI command can still change.

Guardrails

dotnet

4 guardrails, all at version v1.

GuardrailDefault severityWhat it checks
dotnet/central-package-managementwarningOne Directory.Packages.props decides the version of every package, rather than each project file deciding its own.
dotnet/dependencies-versionederrorEvery PackageReference names a version itself or takes one from a central PackageVersion.
dotnet/sdk-pinnedwarningglobal.json names the SDK the build uses and holds it there, rather than letting a newer one on the runner take over.
dotnet/target-framework-floorwarningEvery net<major>.<minor> framework a project targets is no older than the configured floor.

Shared inputs

Every dotnet guardrail declares these inputs, and each one may add its own.

InputDescriptionDefault
projectDirDirectory holding the project, relative to the directory the CLI runs in..

Shared collectors

Every dotnet guardrail is handed the facts these collectors gather, and each one may ask for more of its own.

CollectorGathers
dotnetThe .NET build in the project directory: the SDK it pins, every project file and the frameworks each targets, the packages they reference and which of them are pinned or supplied centrally, and the lock files beside them.

Every guardrail in this category is configured the same way, in the guardrails.checks array of buildnote.json. See Configuring guardrails for every option, and Guardrails to search the whole library.

Buildnote Limited
Registered in England and Wales, Reg: 16140412