Skip to content

Support per-TFM .cssig files - #37

Merged
agocke merged 2 commits into
mainfrom
tfm-cssig
Jun 29, 2026
Merged

Support per-TFM .cssig files#37
agocke merged 2 commits into
mainfrom
tfm-cssig

Conversation

@agocke

@agocke agocke commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Multi-targeted projects couldn't validate per-TFM API surfaces: a single .cssig is checked against every TFM, so net10-only constructs (e.g. C# 14 extension members) fail to parse on a net8 leg.

Change

  • <name>.<tfm>.cssig (e.g. PublicApi.net8.0.cssig) applies only when building that TFM.
  • Unqualified files (PublicApi.cssig) still apply to all TFMs — put shared surface there.
  • Implemented in build/StaticCS.CsSig.props; dotted-but-unqualified names (e.g. PublicApi.Generated.cssig) are preserved.
  • README documents the convention. Bump to 0.3.3.

Verified by MSBuild item evaluation: net8 leg gets PublicApi.net8.0.cssig, net10 leg gets PublicApi.net10.0.cssig, both keep unqualified files.

Validation

  • dotnet test test/test/test.csproj — 111 passed, 1 skipped.

agocke and others added 2 commits June 28, 2026 17:16
Files named <name>.<tfm>.cssig (e.g. PublicApi.net8.0.cssig) now apply only
to that target framework; unqualified files apply to all TFMs. This lets a
multi-targeted project declare a distinct API surface per TFM (e.g. C# 14
extension members on net10 only). Bump to 0.3.3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@agocke
agocke merged commit 50e96a4 into main Jun 29, 2026
2 checks passed
@agocke
agocke deleted the tfm-cssig branch June 29, 2026 01:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant