Skip to content

[release/10.0.1xx] Add 'mcpserver' project template as bundled template - #54319

Merged
jeffhandley merged 5 commits into
release/10.0.1xxfrom
halter73/backport-mcpserver-template-10-0-1xx
May 28, 2026
Merged

jeffhandley merged 5 commits into
release/10.0.1xxfrom
halter73/backport-mcpserver-template-10-0-1xx

Conversation

@halter73

@halter73 halter73 commented May 15, 2026 •

Copy link
Copy Markdown
Member

Backport of #54132 to release/10.0.1xx, adapted for .NET 10.

Changes

  • Added Microsoft.McpServer.ProjectTemplates.10.0 as a bundled template dependency
  • MSBuild properties use 100 suffix (matching existing WebItemTemplates100/WebProjectTemplates100 pattern)
  • Initial version set to 10.0.10 matching current aspnetcore template packages on this branch
  • Updated all test baselines (tab completion and list output) for Windows, Linux, and OSX
  • Added McpServerTemplateTests.cs integration tests

Context

The aspnetcore side is already merged:

This completes the SDK side of getting the mcpserver template into .NET 10 servicing.

Adaptations from main (PR #54132)

Aspect main (.NET 11) release/10.0.1xx (.NET 10)
Package name Microsoft.McpServer.ProjectTemplates.11.0 Microsoft.McpServer.ProjectTemplates.10.0
MSBuild suffix 110 100
Version 11.0.0-preview.4.26230.115 10.0.10
ItemGroup BundledTemplate Bundled100Templates

Tactics

Summary

This PR adds the mcpserver project template (Microsoft.McpServer.ProjectTemplates.10.0) as a bundled template in the .NET 10 SDK (release/10.0.1xx). The aspnetcore side of this work was already merged in dotnet/aspnetcore#66631 and flowed into the VMR; this PR completes the SDK side by wiring up the dependency in eng/Version.Details.xml, eng/Version.Details.props, and src/Layout/redist/targets/BundledTemplates.targets. This is appropriate for a servicing release because the aspnetcore template package (Microsoft.McpServer.ProjectTemplates.10.0 v10.0.10) is already available on the feed following the merge of #54407, and aligns with the existing .NET 10 bundled template pattern (Bundled100Templates item group).

Customer Impact

Customers on .NET 10 SDK (July servicing, 10.0.1xx) will be able to use dotnet new mcpserver to scaffold a new MCP server project without needing to separately install the template package. Without this change, the mcpserver template is absent from dotnet new list output and unavailable via tab completion in the .NET 10 SDK, requiring a manual dotnet new install workaround. This affects all users who want to create MCP server projects using the July servicing release of the .NET 10 SDK.

Regression?

No — this is a new feature addition (the mcpserver template) being backported from main (.NET 11, PR #54132) into the .NET 10 servicing branch. It is not a regression fix.

Testing

  • Integration tests added: McpServerTemplateTests.cs with 6 [Theory] cases covering local, remote, local --no-self-contained, remote --no-self-contained, local --aot, and remote --aot transport options — each exercising dotnet new, dotnet restore, and dotnet build end-to-end.
  • Test baselines updated: Tab completion baselines (Windows, Linux, OSX) and dotnet new list baselines (both --list and legacy form, all three platforms) updated to include mcpserver.
  • Prerequisite: Package availability was blocked on feeds; PR [release/10.0.1xx] Source code updates from dotnet/dotnet #54407 (dependency flow) was merged first to ensure Microsoft.McpServer.ProjectTemplates.10.0 is available on the feed before CI runs.
  • CI: PR was initially failing due to the missing package; once [release/10.0.1xx] Source code updates from dotnet/dotnet #54407 merged, the feed dependency is satisfied and CI is expected to pass.

Risk

Low. The change is additive only — it registers one new bundled template package following the exact same pattern as existing .NET 10 bundled templates (WebItemTemplates100, WebProjectTemplates100). No existing behavior is modified. The corresponding template package is already shipping in the aspnetcore release and is available on the feed. Integration tests covering all template variants are included. No SDK tooling logic is changed.

Copilot AI review requested due to automatic review settings May 15, 2026 01:25
@halter73
halter73 requested review from a team as code owners May 15, 2026 01:25
@halter73
halter73 changed the base branch from main to release/10.0.1xx May 15, 2026 01:27

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

This PR primarily bundles the new .NET 10 MCP server project template into the SDK layout and updates template discovery baselines/tests. It also includes unrelated CLI tool execution, NuGet source credential handling, telemetry detection, and test-skip changes that are outside the described MCP template backport scope.

Changes:

  • Adds Microsoft.McpServer.ProjectTemplates.10.0 versioning/layout entries and MCP template integration tests.
  • Updates dotnet new list and completion approval baselines to include MCP/mcpserver.
  • Adds unrelated changes for local tool execution restore/cache behavior, package source overrides with credentials, Copilot telemetry detection, and a skipped dotnet test theory.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
eng/Version.Details.props Adds MCP template package version properties.
eng/Version.Details.xml Adds MCP template dependency metadata.
src/Layout/redist/targets/BundledTemplates.targets Adds MCP template to bundled .NET 10 templates.
test/dotnet-new.IntegrationTests/McpServerTemplateTests.cs Adds restore/build integration coverage for MCP template variants.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Windows.verified.txt Adds MCP category to Windows list baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.OSX.verified.txt Adds MCP category to OSX list baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewListTests.BasicTest_WhenListCommandIsUsed.Linux.verified.txt Adds MCP category to Linux list baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Windows.verified.txt Adds MCP category to Windows legacy list baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.OSX.verified.txt Adds MCP category to OSX legacy list baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewListTests.BasicTest_WhenLegacyCommandIsUsed_common.Linux.verified.txt Adds MCP category to Linux legacy list baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Windows.verified.txt Adds mcpserver to Windows completion baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.OSX.verified.txt Adds mcpserver to OSX completion baseline.
test/dotnet-new.IntegrationTests/Approvals/DotnetNewCompleteTests.CanDoTabCompletion.Linux.verified.txt Adds mcpserver to Linux completion baseline.
src/Cli/dotnet/Commands/Tool/Execute/ToolExecuteCommand.cs Changes local tool execute restore/cache behavior and selected package source handling.
src/Cli/dotnet/ToolPackage/PackageLocation.cs Adds package source override storage.
src/Cli/dotnet/ToolPackage/ToolPackageDownloaderBase.cs Passes package source overrides into NuGet package source resolution.
src/Cli/dotnet/NugetPackageDownloader/PackageSourceLocation.cs Adds package source override support.
src/Cli/dotnet/NugetPackageDownloader/NuGetPackageDownloader.cs Uses package source overrides when loading NuGet sources.
test/Microsoft.DotNet.PackageInstall.Tests/NuGetPackageInstallerTests.cs Adds coverage for package source overrides preserving credentials.
test/Microsoft.DotNet.PackageInstall.Tests/EndToEndToolTests.cs Adds end-to-end tests for tool exec/dnx with unrestored local manifest tools.
src/Cli/dotnet/Telemetry/LLMEnvironmentDetectorForTelemetry.cs Adds COPILOT_CLI detection as Copilot telemetry.
test/dotnet.Tests/TelemetryCommonPropertiesTests.cs Adds telemetry test case for COPILOT_CLI.
test/dotnet.Tests/CommandTests/Test/GivenDotnetTestBuildsAndRunsTestfromCsproj.cs Skips an existing output-path escaping theory.

@halter73

halter73 commented May 15, 2026 •

Copy link
Copy Markdown
Member Author

The CI is failing because Microsoft.McpServer.ProjectTemplates.10.0 hasn't been published to the correct feeds.

I had to manually trigger the a6e017f9-bb8f-4e92-9b9b-01e2a6e340e2 subscription using darc to open #54320. I think we'll have to merge that first.

Edit: #54320 is currently missing 55d31fb (it's currently at bcdf64a...dc6e7082), so we'll probably need to wait for a successful VMR build and retrigger the subscription.

@jeffhandley
jeffhandley force-pushed the halter73/backport-mcpserver-template-10-0-1xx branch from 7ac2a0e to 08fd88c Compare May 22, 2026 05:23
Comment thread eng/Version.Details.xml Resolved
@jeffhandley
jeffhandley marked this pull request as draft May 22, 2026 07:37
halter73 and others added 3 commits May 22, 2026 03:43
Backport of PR #54132 to release/10.0.1xx, adapted for .NET 10:
- Package: Microsoft.McpServer.ProjectTemplates.10.0
- MSBuild properties use 100 suffix (matching existing web templates)
- Version 10.0.9 matching current aspnetcore template packages
- Updated all test baselines (tab completion and list output)
- Added McpServerTemplateTests.cs

The aspnetcore side is already merged (dotnet/aspnetcore#66631)
and flowed into the VMR (dotnet/dotnet#6539).

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
@jeffhandley
jeffhandley force-pushed the halter73/backport-mcpserver-template-10-0-1xx branch from ab45021 to b0adb90 Compare May 22, 2026 10:47
@jeffhandley
jeffhandley marked this pull request as ready for review May 22, 2026 10:47
@jeffhandley

Copy link
Copy Markdown
Member

/tactics

I re-triggered the subscription, which created #54407. With that now merged, the necessary new package is available on the feed, and this PR is now ready for review for backport into July servicing.

@jeffhandley

Copy link
Copy Markdown
Member

/ba-g test timeout due to known infrastructure error that surfaces as a build failure

@jeffhandley
jeffhandley merged commit 4f80815 into release/10.0.1xx May 28, 2026
28 checks passed
@jeffhandley
jeffhandley deleted the halter73/backport-mcpserver-template-10-0-1xx branch May 28, 2026 09:39
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-rc1 milestone Aug 7, 2026
@wtgodbe wtgodbe removed this from the 11.0-rc1 milestone Sep 2, 2026
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.

5 participants