Repository navigation
[release/11.0.1xx] Test the in-repo TemplateEngine samples instead of the published package - #57175
Merged
nagilson merged 1 commit intoNov 17, 2026
Conversation
… 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
|
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. |
Contributor
There was a problem hiding this comment.
🟢 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
TemplateEngineSamplesdirectory. - 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
enabled auto-merge
November 17, 2026 19:14
JoeRobich
approved these changes
Nov 17, 2026
MiYanni
approved these changes
Nov 17, 2026
nagilson
had a problem deploying
to
copilot-pat-pool
November 17, 2026 20:12 — with
GitHub Actions
Failure
This branch had an error being deployed
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.
Backport of the TemplateEngine samples test changes from #57089 (commits c3dff14, 13f5760, f04e8de on
main).TemplateEngineSamplesTestrandotnet new install Microsoft.TemplateEngine.Sampleswith 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.