diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bebe41e..7603dcf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,7 +103,13 @@ jobs: - name: Build with nullable warnings treated as errors shell: pwsh run: | - & msbuild $env:SOLUTION_PATH /t:Build /m /p:Configuration=Debug ` + # Use /t:Rebuild (not /t:Build) so this step always performs a genuine full + # recompile under /p:Nullable=enable. The preceding "Build with analyzers" + # step already compiled everything under the projects' own Nullable settings; + # MSBuild's incremental up-to-date check does not invalidate on a changed + # -p:Nullable command-line property alone, so a plain /t:Build here would + # silently skip recompilation and never actually enforce this gate. + & msbuild $env:SOLUTION_PATH /t:Rebuild /m /p:Configuration=Debug ` "/p:Platform=Any CPU" ` /p:Nullable=enable /p:TreatWarningsAsErrors=true if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }