build: ratchet warnings to errors for every project via Directory.Build.props; refresh stale comment (lmxopcua#766)
v2-ci / unit-tests (push) Has been cancelled

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 13:34:45 -05:00
parent c29f98ffe0
commit c904472af2
+6 -4
View File
@@ -2,16 +2,18 @@
<!--
Defaults inherited by every csproj. Individual projects may override.
TreatWarningsAsErrors is NOT set globally because test projects carry analyzer warnings
(e.g. xUnit1051) that would fail the build. src/ projects opt in to
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> in their own csproj — all 61 do as of #606.
It stays per-project rather than global only because the test projects are not yet clean.
TreatWarningsAsErrors is ON for every project, src/ and tests alike (#766 ratchet). The solution builds with
0 warnings since #725 (xUnit1051 etc. cleaned), so any new warning, including analyzer ones, now fails the
build instead of accumulating. The 61 src/ projects also still set it in their own csproj (#606); that is
redundant but harmless. A project that genuinely needs an exception should suppress the specific warning
via NoWarn, not turn this off.
-->
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<!--