Skip to content

Clarify Orleans constructor migration guidance#52870

Open
ReubenBond wants to merge 4 commits intodotnet:mainfrom
ReubenBond:rebond/orleans-9895-constructor-docs
Open

Clarify Orleans constructor migration guidance#52870
ReubenBond wants to merge 4 commits intodotnet:mainfrom
ReubenBond:rebond/orleans-9895-constructor-docs

Conversation

@ReubenBond
Copy link
Copy Markdown
Member

@ReubenBond ReubenBond commented Apr 5, 2026

Summary

  • clarify that OrleansConstructorAttribute should be replaced with ActivatorUtilitiesConstructorAttribute when selecting a serializer constructor
  • explain that GeneratedActivatorConstructorAttribute is only for generated activators, such as DI-based activation
  • update the Orleans 10 breaking changes summary to match

Fixes dotnet/orleans#9895


Internal previews

📄 File 🔗 Preview link
docs/orleans/migration-guide.md Orleans migration guides

Update the Orleans migration guide and breaking changes summary to distinguish serializer constructors from generated activator constructors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond requested a review from meaghanlewis as a code owner April 5, 2026 15:41
Copilot AI review requested due to automatic review settings April 5, 2026 15:41
@dotnetrepoman dotnetrepoman bot added this to the April 2026 milestone Apr 5, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Orleans 10 migration documentation to clarify which attribute you should use when selecting constructors for serialization versus generated activators, and aligns the Orleans 10 breaking changes summary with that guidance.

Changes:

  • Clarifies that OrleansConstructorAttribute should be replaced with <xref:Microsoft.Extensions.DependencyInjection.ActivatorUtilitiesConstructorAttribute> for serializer constructor selection.
  • Explains that <xref:Orleans.GeneratedActivatorConstructorAttribute> is intended for generated activators (for example, DI-based activation).
  • Updates the Orleans 10 breaking changes summary row to match the clarified guidance.
Show a summary per file
File Description
docs/orleans/migration-guide.md Expands the breaking change explanation and updates the example to use [ActivatorUtilitiesConstructor] for serializer construction.
docs/orleans/includes/orleans-10-breaking-changes.md Updates the breaking changes summary migration guidance to distinguish serializer vs. generated activator constructor attributes.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 0

ReubenBond and others added 3 commits April 5, 2026 08:49
Clarify that the replacement attributes are for dependency injection scenarios and update the migration example to use an injected service instead of serialized data.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the Orleans migration guide example so the injected dependency property is marked with [field: NonSerialized] and does not trigger analyzer warnings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the Orleans migration guide sample to note that [OrleansConstructor] was obsolete and ignored.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

Error in generated Activator after upgrading Orleans 9.x to 10.x and migrating [OrleansConstructor] to [GeneratedActivatorConstructor]

2 participants