Merged
Conversation
318def4 to
81941d1
Compare
Member
joelverhagen
reviewed
Sep 5, 2025
.../Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/McpServer-CSharp.csproj.in
Show resolved
Hide resolved
joelverhagen
reviewed
Sep 5, 2025
.../Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/McpServer-CSharp.csproj.in
Outdated
Show resolved
Hide resolved
joelverhagen
reviewed
Sep 5, 2025
.../Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/McpServer-CSharp.csproj.in
Outdated
Show resolved
Hide resolved
joelverhagen
reviewed
Sep 5, 2025
...sions.AI.Templates.IntegrationTests/Snapshots/mcpserver.AotTrue.verified/mcpserver/README.md
Outdated
Show resolved
Hide resolved
joelverhagen
reviewed
Sep 5, 2025
...rosoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/.template.config/ide.host.json
Show resolved
Hide resolved
timheuer
reviewed
Sep 5, 2025
...rosoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/.template.config/template.json
Outdated
Show resolved
Hide resolved
joelverhagen
reviewed
Sep 8, 2025
src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/README.md
Show resolved
Hide resolved
joelverhagen
approved these changes
Sep 8, 2025
9004017 to
62a4e1d
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the MCP server template to provide better guidance for users, particularly around creating self-contained, single-file executables. The update adds command-line options for users to specify framework targets, self-containment, and AOT compilation settings.
- Adds support for
--framework,--self-contained, and--aotcommand-line arguments with appropriate defaults - Updates project configuration to generate self-contained single-file executables by default
- Includes conditional MSBuild properties based on template arguments for different deployment scenarios
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Multiple snapshot test files | Updated to reflect new template output with self-contained configurations |
| McpServerSnapshotTests.cs | Added test methods for new template argument scenarios |
| README.md | Enhanced documentation explaining self-contained vs framework-dependent deployment |
| McpServer-CSharp.csproj.in | Updated MSBuild properties with conditional logic for different deployment modes |
| template.json | Added new parameter symbols for framework, AOT, and self-contained options |
| ide.host.json | Made new template parameters visible in IDE |
| dotnetcli.host.json | Configured CLI parameter names and visibility |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/README.md
Outdated
Show resolved
Hide resolved
src/ProjectTemplates/Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/README.md
Outdated
Show resolved
Hide resolved
.../Microsoft.Extensions.AI.Templates/src/McpServer/McpServer-CSharp/McpServer-CSharp.csproj.in
Show resolved
Hide resolved
ac15849 to
582b4ce
Compare
582b4ce to
86fac67
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #6560
This updates the MCP server template to have some new guidance particularly to use a self-contained, single file executable. It also allows for users to specify that they want to use AOT via a command-line argument.
--frameworknet9.0--self-containedtrue--aotfalseThe matrix of possible values for some MSBuild properties is a little complicated, this table explains how certain arguments affect them:
And the default values for
RuntimeIdentifersis:win-x64win-arm64osx-arm64linux-x64linux-arm64linux-musl-x64Microsoft Reviewers: Open in CodeFlow