dotnet
4 guardrails, all at version v1.
| Guardrail | Default severity | What it checks |
|---|---|---|
dotnet/central-package-management | warning | One Directory.Packages.props decides the version of every package, rather than each project file deciding its own. |
dotnet/dependencies-versioned | error | Every PackageReference names a version itself or takes one from a central PackageVersion. |
dotnet/sdk-pinned | warning | global.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-floor | warning | Every 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.
| Input | Description | Default |
|---|---|---|
projectDir | Directory 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.
| Collector | Gathers |
|---|---|
dotnet | The .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.