Skip to content

[10.x] fix(packaging): restore standalone serializer code generation - #11603

Merged
ReubenBond merged 3 commits into
dotnet:10.xfrom
ReubenBond:rb-serializer-codegen-backport
Oct 28, 2026
Merged

ReubenBond merged 3 commits into
dotnet:10.xfrom
ReubenBond:rb-serializer-codegen-backport

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Problem

Projects which reference Microsoft.Orleans.Serialization alone lost their transitive source-generator and analyzer dependencies, so [GenerateSerializer] payloads compile but fail at runtime with CodecNotFoundException. The same packaging metadata affects other packages that enable Orleans build-time code generation.

Solution

Preserve the packable generator and analyzer project references as NuGet dependencies using Private="false", retaining analyzer-only build assets and keeping their assemblies out of copy-local outputs. Nonpackable projects retain their existing reference metadata so test projects can load explicit runtime references to the generator and analyzers.

Add isolated package-consumer regression coverage for individual packages and combined SDK/client/server references on .NET 8 and .NET 10, and run it after package validation in CI. Clarify the standalone serialization package's generated codec and copier behavior in its README.

Backport of #11597, cherry-picked from 9b594f0, bcf004c, and 7bc74ff. All commits applied cleanly to 10.x; no branch-specific adaptations were required.

Fixes #11582.

Microsoft Reviewers: Open in CodeFlow

Preserve generator and analyzer NuGet dependencies with Private=false while keeping their assemblies out of copy-local outputs. ReferenceOutputAssembly=false unintentionally removed those dependencies in dotnet#10035.

Exercise isolated consumers of locally packed serialization, extension, runtime and metapackages, including combined references, on net8.0 and net10.0.

(cherry picked from commit 9b594f0)
…ests

Restrict copy-local suppression to packable projects. Nonpackable projects retain their prior ReferenceOutputAssembly=false analyzer reference metadata, allowing CodeGenerator.Tests and Analyzers.Tests to load their explicit runtime references.

(cherry picked from commit 7bc74ff)
@ReubenBond ReubenBond changed the title fix(packaging): backport standalone serializer code generation to 10.x [10.x] fix(packaging): restore standalone serializer code generation Oct 27, 2026
@ReubenBond
ReubenBond force-pushed the rb-serializer-codegen-backport branch from 834bc4b to 8681442 Compare October 27, 2026 21:26
@ReubenBond
ReubenBond merged commit 469ab12 into dotnet:10.x Oct 28, 2026
86 checks passed
@ReubenBond
ReubenBond deleted the rb-serializer-codegen-backport branch October 28, 2026 14:50
This was referenced Oct 29, 2026
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