Repository navigation
Restrict MCP template tests to the current RID - #69906
Merged
wtgodbe merged 1 commit intoOct 16, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Review evidence is incomplete, and generated-project publish, build, and execution remain unverified.
No open issues 🎉
What changed in this PR
Restricts self-contained MCP template tests to the host runtime identifier (RID), avoiding unnecessary runtime-pack restores.
Changes:
- Adds optional restore arguments to the shared template helper.
- Applies host-RID arguments to self-contained restore, publish, and build operations.
- Leaves framework-dependent scenarios unchanged.
| File | Description |
|---|---|
| src/ProjectTemplates/test/Templates.Tests/McpServerTemplateTest.cs | Restricts self-contained scenarios to the current RID. |
| src/ProjectTemplates/Shared/Project.cs | Accepts optional arguments for template-project restore. |
Review effort: Balanced
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:33 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:33 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:34 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:36 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:37 — with
GitHub Actions
Inactive
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:37 — with
GitHub Actions
Inactive
Contributor
|
✅ No documentation PR was created. Confidence that documentation is needed: 3% No docs needed: the PR is test infrastructure only (restricting MCP template tests to the host RID). Documentation surfaces considered
|
wtgodbe
temporarily deployed
to
copilot-pat-pool
October 16, 2026 23:37 — with
GitHub Actions
Inactive
This branch was previously 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.
Restrict MCP template tests to the current RID
Restore MCP template tests for only the host RID
Description
Adds an optional restore argument to the shared template-test helper and uses it for self-contained MCP scenarios. Restore, publish, and build now receive both the current
RuntimeIdentifierand a single-valueRuntimeIdentifiers, matching the existingRun-McpServer-Locally.ps1behavior.Framework-dependent MCP scenarios remain unchanged.
Validation:
source activate.sh && dotnet build src/ProjectTemplates/test/Templates.Tests/Templates.Tests.csproj -v:minimal— passed after preparing the documented template-test prerequisites.linux-arm64,linux-musl-x64,linux-x64,osx-arm64,win-arm64, andwin-x64.osx-arm64runtime pack.source activate.sh && dotnet test src/ProjectTemplates/test/Templates.Tests/Templates.Tests.csproj --no-build --no-restore --filter "FullyQualifiedName~McpServerTemplateTest"— reached the generated-project restores, then was blocked by the incomplete local package graph (NU1102/NU1603). The restore output confirmed that each self-contained scenario was restricted to one RID.Related to internal CI build 3107295; no public issue.