Skip to content

[DRAFT] Use runtime specific, self-contained packages, target .NET 9 #6645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

joelverhagen
Copy link
Member

@joelverhagen joelverhagen commented Jul 22, 2025

Resolve #6560.

This uses the new RID-specific tool packages feature to reduce runtime compatibility issues to "all you need is dnx".

I switched to .NET 9.0 to avoid trimming warnings related to System.Text.Json in .NET 8.

I selected the list of RIDs based on .NET SDK telemetry on the tool verb.

Microsoft Reviewers: Open in CodeFlow

@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 22:18
@joelverhagen joelverhagen requested a review from a team as a code owner July 22, 2025 22:18
@joelverhagen joelverhagen marked this pull request as draft July 22, 2025 22:18
@github-actions github-actions bot added the area-ai-templates Microsoft.Extensions.AI.Templates label Jul 22, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

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 updates the MCP server project template to target .NET 9.0 and configures runtime-specific, self-contained packages to improve compatibility and reduce deployment dependencies. The changes enable the creation of multiple platform-specific NuGet packages that include all necessary runtime components.

Key changes:

  • Upgrade target framework from .NET 8.0 to .NET 9.0
  • Add runtime identifier configuration for major platforms (Windows, Linux, macOS on x64/ARM64)
  • Enable self-contained publishing with trimming optimizations
  • Update documentation to explain the new multi-package output structure

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
McpServer-CSharp.csproj.in Template project file updated with .NET 9.0 target, runtime identifiers, and self-contained publishing settings
mcpserver.csproj Integration test snapshot reflecting the same project configuration changes
README.md (template) Updated documentation explaining the new multi-package output structure and runtime identifier concepts
README.md (test snapshot) Integration test snapshot of the updated documentation

joelverhagen and others added 2 commits July 22, 2025 18:22
…Server/McpServer-CSharp/README.md

Co-authored-by: Copilot <[email protected]>
…ationTests/Snapshots/mcpserver.Basic.verified/mcpserver/README.md

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ai-templates Microsoft.Extensions.AI.Templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the MCP server template to produce self-contained packages
1 participant