Repository navigation
[release/10.0.1xx] Add 'mcpserver' project template as bundled template - #54319
Conversation
There was a problem hiding this comment.
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.0versioning/layout entries and MCP template integration tests. - Updates
dotnet new listand 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 testtheory.
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. |
|
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 Edit: #54320 is currently missing |
7ac2a0e to
08fd88c
Compare
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]>
ab45021 to
b0adb90
Compare
|
/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. |
|
/ba-g test timeout due to known infrastructure error that surfaces as a build failure |
Backport of #54132 to
release/10.0.1xx, adapted for .NET 10.Changes
Microsoft.McpServer.ProjectTemplates.10.0as a bundled template dependency100suffix (matching existingWebItemTemplates100/WebProjectTemplates100pattern)10.0.10matching current aspnetcore template packages on this branchMcpServerTemplateTests.csintegration testsContext
The aspnetcore side is already merged:
This completes the SDK side of getting the
mcpservertemplate into .NET 10 servicing.Adaptations from main (PR #54132)
Microsoft.McpServer.ProjectTemplates.11.0Microsoft.McpServer.ProjectTemplates.10.011010011.0.0-preview.4.26230.11510.0.10BundledTemplateBundled100TemplatesTactics
Summary
This PR adds the
mcpserverproject 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 ineng/Version.Details.xml,eng/Version.Details.props, andsrc/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 (Bundled100Templatesitem group).Customer Impact
Customers on .NET 10 SDK (July servicing,
10.0.1xx) will be able to usedotnet new mcpserverto scaffold a new MCP server project without needing to separately install the template package. Without this change, themcpservertemplate is absent fromdotnet new listoutput and unavailable via tab completion in the .NET 10 SDK, requiring a manualdotnet new installworkaround. 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
mcpservertemplate) being backported from main (.NET 11, PR #54132) into the .NET 10 servicing branch. It is not a regression fix.Testing
McpServerTemplateTests.cswith 6[Theory]cases coveringlocal,remote,local --no-self-contained,remote --no-self-contained,local --aot, andremote --aottransport options — each exercisingdotnet new,dotnet restore, anddotnet buildend-to-end.dotnet new listbaselines (both--listand legacy form, all three platforms) updated to includemcpserver.Microsoft.McpServer.ProjectTemplates.10.0is available on the feed before CI runs.Risk
Low. The change is additive only — it registers one new bundled template package following the exact same pattern as existing
.NET 10bundled 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.