dotnet
4 guardrails, all at version v1.
| Guardrail | Default severity | What it checks |
|---|---|---|
dotnet/central-package-management | warning | A single Directory.Packages.props sets the version of every package, instead of each project file setting its own. |
dotnet/dependencies-versioned | error | Every PackageReference names its own version or takes one from a central PackageVersion. |
dotnet/sdk-pinned | warning | global.json names the SDK the build uses and holds it there, so a newer SDK on the runner can't 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. Individual guardrails can add their own.
| Input | Description | Default |
|---|---|---|
projectDir | Directory holding the project, relative to the directory the CLI runs in. | . |
Shared collectors
Every dotnet guardrail receives the facts these collectors gather. Individual guardrails can ask for more collectors of their 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. |
You configure every guardrail in this category the same way, in the guardrails.checks array of buildnote.json. Configuring guardrails lists every option, and Guardrails lets you search the whole library.