Skip to content

[release/11.0.1xx] Test the in-repo TemplateEngine samples instead of the published package - #57175

Merged
nagilson merged 1 commit into
dotnet:release/11.0.1xxfrom
nagilson:backport-samples-11.0.1xx
Nov 17, 2026
Merged

nagilson merged 1 commit into
dotnet:release/11.0.1xxfrom
nagilson:backport-samples-11.0.1xx

Conversation

@nagilson

@nagilson nagilson commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Backport of the TemplateEngine samples test changes from #57089 (commits c3dff14, 13f5760, f04e8de on main).

TemplateEngineSamplesTest ran dotnet new install Microsoft.TemplateEngine.Samples with no version, so it always got the newest package from nuget.org. Then the checked in snaposhot with old versions hardcoded didn't match.

Relates to #57042. release/10.0.4xx is handled separately with a version pin, because 10.0.x has no in-repo samples to build.

… the published package

Backport of the samples changes from dotnet#57089 (main). TemplateEngineSamplesTest installed the latest published Microsoft.TemplateEngine.Samples, so publishing 11.0.100 GA (SDK-style F# project) broke the checked-in snapshot on every branch. Build the samples project into the test output and install from that folder, and update the F# snapshot to the in-repo content.

Fixes dotnet#57042 on release/11.0.1xx.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 3a9812a1-ab94-4bad-b412-d16ef17dc6fa
@nagilson
nagilson requested review from a team as code owners November 17, 2026 18:36
Copilot AI balanced review requested due to automatic review settings November 17, 2026 18:36
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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.

🟢 Approval recommended

No active review issues were identified for the backport that switches template sample verification to repository content.

No open issues 🎉

What changed in this PR

Backports the TemplateEngine test fix from #57089 to release/11.0.1xx, making sample verification use repository content instead of the latest published NuGet package. The unrelated dotnet-watch fix is excluded.

Changes:

  • Copy sample templates into the integration-test output through a project reference.
  • Install samples from the local TemplateEngineSamples directory.
  • Align the F# approval snapshot with the in-repo sample.
File Description
test/​dotnet-new.IntegrationTests/​TemplateEngineSamplesTest.cs Installs samples from the test output directory.
test/​dotnet-new.IntegrationTests/​dotnet-new.IntegrationTests.csproj References the samples project without referencing its assembly.
test/​dotnet-new.IntegrationTests/​Approvals/​sample06.console-csharp-fsharp.language=F#.verified/​sample06/​MyProject.Con.fsproj Updates the F# snapshot to use Microsoft.NET.Sdk without legacy package references.
documentation/​TemplateEngine/​Samples/​Microsoft.TemplateEngine.Samples.csproj Adds output-copy metadata under TemplateEngineSamples/, retaining the explicit package path.

Review effort: Balanced

@nagilson
nagilson requested a review from MiYanni November 17, 2026 19:14
@nagilson
nagilson enabled auto-merge November 17, 2026 19:14

This branch had an error being deployed

1 failed deployment
copilot-pat-pool — 68ec9f00 Deployed Nov 17, 2026 by nagilson via pre_activation #14423
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants