Repository navigation
fix(packaging): restore standalone serializer code generation - #11597
Merged
ReubenBond merged 3 commits intoOct 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The shared packaging change affects multiple dependency graphs, and successful end-to-end consumer validation has not been established by the available evidence.
No open issues 🎉
What changed in this PR
Restores source-generator and analyzer delivery for standalone Orleans packages, addressing the serialization regression reported in #11582.
Changes:
- Preserves NuGet analyzer dependencies while keeping analyzer assemblies out of copy-local outputs.
- Adds isolated package-consumer checks in CI for .NET 8 and .NET 10.
- Documents automatic codec and copier generation for Serialization-only consumers.
| File | Description |
|---|---|
src/Orleans.Serialization/README.md |
Clarifies the package’s generator and analyzer guarantee. |
Directory.Build.targets |
Uses Private="false" to preserve analyzer package dependencies. |
.github/workflows/ci.yml |
Runs package-consumer validation after Linux packaging. |
.github/scripts/test-package-consumers.ps1 |
Tests serialization, copying, analyzer registration, and output isolation using local packages. |
Review effort: Balanced
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.
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.
ReubenBond
force-pushed
the
rb-standalone-serializer-codegen
branch
from
October 27, 2026 21:17
7bc74ff to
66afd9e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11582.
#10035 added
ReferenceOutputAssembly="false"to the build-time analyzer project references. NuGet consequently omitted the code generator and analyzer package dependencies starting in 10.3.0, so Serialization-only consumers compiled attributed types but failed withCodecNotFoundExceptionat runtime.Use
Private="false"on the packable analyzer references in packable projects instead. This preserves theirinclude="All"NuGet dependencies while keeping analyzer assemblies out of copy-local outputs. Nonpackable projects retain their existing analyzer-reference metadata, allowing analyzer test projects to load their explicit runtime references. The shared packaging fix also restores generator delivery through standalone Core, Runtime, Streaming, and serializer-extension packages, and composes with SDK/Client/Server references.Add isolated consumers of locally packed packages, gated in CI on .NET 8 and .NET 10. They verify codec round trips, deep-copy values and identity, exactly one generator/analyzer registration, and build-only analyzer outputs. Source mapping and a fresh NuGet cache ensure the consumers use the local Orleans packages; building outside the repository prevents repository imports from masking missing package assets. Clarify the package's generator guarantee in its README.
Microsoft Reviewers: Open in CodeFlow