Skip to content

fix(templates): use shipped Orleans package version - #10690

Merged
ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-template-package-versions
Aug 20, 2026
Merged

ReubenBond merged 1 commit into
dotnet:mainfrom
ReubenBond:rb-fix-template-package-versions

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Problem

The orleans and orleans-web templates hard-code Orleans 10.2.2, so newly generated projects can reference a release older than the installed template package.

Solution

Stage both template manifests through the NuGet pack extension point and set their default Orleans version from $(PackageVersion). The checked-in manifests use the repository's 10.0.0-dev version for local template development, while packed artifacts inherit their exact package version, including prerelease labels.

The pack target validates that each manifest contains exactly one expected development default before replacing it, so manifest drift fails packaging instead of silently shipping a stale version.

The template README now documents that generated projects default to the Orleans version shipped with the template package.

Microsoft Reviewers: Open in CodeFlow

Stage template manifests during packing and set their default Orleans version from the template package version, preserving prerelease labels and a usable local development default.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 19, 2026 22:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the Orleans project templates packaging so generated projects default to the same Orleans package version as the installed Microsoft.Orleans.Templates NuGet package, avoiding stale hard-coded versions in newly created projects.

Changes:

  • Switch the checked-in template manifests’ default Orleans version to a development placeholder (10.0.0-dev) for local template development.
  • Add a pack-time MSBuild target which stages the two template manifests and replaces the development placeholder with $(PackageVersion), validating the placeholder appears exactly once per manifest.
  • Update the template README to document that generated projects default to the version shipped with the template package (including prerelease versions).
Show a summary per file
File Description
templates/Microsoft.Orleans.Templates/templates/orleans/.template.config/template.json Updates the checked-in default Orleans version to the development placeholder used for pack-time replacement.
templates/Microsoft.Orleans.Templates/templates/orleans-web/.template.config/template.json Updates the checked-in default Orleans version to the development placeholder used for pack-time replacement.
templates/Microsoft.Orleans.Templates/README.md Clarifies that template output uses the Orleans version shipped in the template package, and that --orleans-version overrides it.
templates/Microsoft.Orleans.Templates/Microsoft.Orleans.Templates.csproj Adds pack-time staging/rewrite of template manifests via a Roslyn MSBuild task and includes the rewritten manifests in the nupkg.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 4/4 changed files
  • Comments generated: 0
  • Review effort level: Lite

@ReubenBond
ReubenBond merged commit c4b9813 into dotnet:main Aug 20, 2026
70 of 73 checks passed
@ReubenBond
ReubenBond deleted the rb-fix-template-package-versions branch August 20, 2026 02:31
This was referenced Aug 28, 2026
This was referenced Sep 8, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants