Summary
Add a Directory.Build.props file at the repository root to centralise shared MSBuild properties across all projects.
Details
This file should include:
EnforceCodeStyleInBuild: Set to true so .editorconfig style rules are checked during build
AnalysisLevel: Set to latest-recommended to enable the built-in .NET analysers
Nullable: Enable nullable reference types repo-wide (if not already set per-project)
TreatWarningsAsErrors: Consider enabling for analyser warnings (CA/IDE rules) — but assess the impact on the current codebase first
ImplicitUsings: Align on whether this is enabled or disabled repo-wide
The goal is to have one place for build-wide settings rather than duplicating them in each .csproj.
Acceptance Criteria
Notes
Start conservative — if enabling analysers produces too many warnings, set the severity to suggestion initially and tighten in follow-up issues.
Summary
Add a
Directory.Build.propsfile at the repository root to centralise shared MSBuild properties across all projects.Details
This file should include:
EnforceCodeStyleInBuild: Set totrueso.editorconfigstyle rules are checked during buildAnalysisLevel: Set tolatest-recommendedto enable the built-in .NET analysersNullable: Enable nullable reference types repo-wide (if not already set per-project)TreatWarningsAsErrors: Consider enabling for analyser warnings (CA/IDE rules) — but assess the impact on the current codebase firstImplicitUsings: Align on whether this is enabled or disabled repo-wideThe goal is to have one place for build-wide settings rather than duplicating them in each
.csproj.Acceptance Criteria
Directory.Build.propsadded at repository rootEnforceCodeStyleInBuildenabled.csprojfilesNotes
Start conservative — if enabling analysers produces too many warnings, set the severity to
suggestioninitially and tighten in follow-up issues.