Skip to content

Release build is not exercised for non-packable projects #332

Description

@amis92

TreatWarningsAsErrors is enabled only for Release (Directory.Build.props), but CI never builds most of the tree in Release.

ci.yml runs:

dotnet build --no-restore   # Debug
dotnet test --no-build      # Debug
dotnet pack                 # Release — but only packable projects

dotnet pack on the solution short-circuits for IsPackable=false projects without building them. That covers every test project, plus RosterEngine, RosterEngine.Spec and Phalanx.SampleDataset. So Release-only diagnostics in any of those never surface in CI.

Demonstrated while splitting #274: that branch had 58 Release errors (CA1307, CS8602/CS8604, xUnit1051/xUnit1031, CA1822, CA1859, CA1305, CA1031) and its CI was green throughout. All of them were fixed across #318#322 so main is Release-clean today, but nothing prevents a recurrence.

Note the same gap was hit independently from the other direction — ab77d59 on feat/yaml-reader found 16 CA1822 errors only when a downstream Release publish tripped over them.

Suggested fix: add a Release build to CI, e.g.

- run: dotnet build -c Release --no-restore

This costs a second compile. An alternative is to build only Release and run tests against it, rather than building both.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions