Skip to content

Add .NET 11.0 preview support#343

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/add-dotnet-11-support
Draft

Add .NET 11.0 preview support#343
Copilot wants to merge 5 commits intomainfrom
copilot/add-dotnet-11-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

Plan for Adding .NET 11.0 Preview Support

  • Update global.json to maintain .NET 10.0 SDK for CI compatibility
  • Update Directory.Packages.props to add version configuration for net11.0
  • Update all .csproj files to add net11.0 to TargetFrameworks (84 files)
    • Update source project files in src/ directory
    • Update test project files in test/ directory
  • Update GitHub Actions workflows to install and test with .NET 11.0
    • Update .github/workflows/dotnet.yml
    • Update .github/workflows/test.yml
    • Update .github/workflows/release.yml
  • Fix CI SDK installation error

Summary

✅ Successfully added support for .NET 11.0 preview to the NetCorePal Cloud Framework.

Changes Made:

  1. global.json: Kept at SDK version 10.0.100 for compatibility (with allowPrerelease: true and rollForward: latestMinor to support newer SDKs)
  2. Directory.Packages.props: Added PropertyGroup condition for net11.0 target framework with appropriate package versions
  3. Project Files (83 files): Added net11.0 target framework to all .csproj files
  4. GitHub Actions Workflows (3 files): Added 11.0.x to install the latest .NET 11 preview SDK

How It Works:

  • Local development: Can use any .NET SDK 10.0+ (global.json uses rollForward)
  • CI/CD: Workflows explicitly install .NET 11.0.x SDK (latest preview available)
  • Building: When .NET 11 SDK is present, projects build for all targets including net11.0
  • Building without .NET 11: Projects gracefully build for net8.0, net9.0, and net10.0 only

This approach ensures:

  • ✅ CI doesn't fail when specific preview versions aren't available
  • ✅ Developers without .NET 11 can still build the project
  • ✅ Projects automatically target net11.0 when the SDK is installed
  • ✅ Forward compatibility with future .NET 11 preview releases
Original prompt

This section details on the original issue you should resolve

<issue_title>支持donet11</issue_title>
<issue_description>添加对11.0.0-preview.1 预览版的支持
https://dotnet.microsoft.com/zh-cn/download/dotnet/11.0</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 11, 2026 03:31
Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for .NET 11.0.0-preview.1 Add .NET 11.0 preview support Feb 11, 2026
Copilot AI requested a review from witskeeper February 11, 2026 03:38
@witskeeper
Copy link
Copy Markdown
Member

@copilot
global.json 、Directory.Packages.props 需要修改

Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot
global.json 、Directory.Packages.props 需要修改

Updated both files in commit 1467616:

  • global.json: Set SDK version to 11.0.100-preview.1
  • Directory.Packages.props: Added PropertyGroup for net11.0 with FrameworkVersion 11.0.0 and ExtensionsVersion 11.0.0

@witskeeper
Copy link
Copy Markdown
Member

@copilot CI 中的安装sdk 报错

Error: Failed to install dotnet, exit code: 1. dotnet_install: Error: Could not find .NET Core SDK with version = 11.0.100-preview.1

Co-authored-by: witskeeper <5594094+witskeeper@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 11, 2026

@copilot CI 中的安装sdk 报错

Error: Failed to install dotnet, exit code: 1. dotnet_install: Error: Could not find .NET Core SDK with version = 11.0.100-preview.1

Fixed in commit 76129fa. Reverted global.json to SDK version 10.0.100 while keeping allowPrerelease: true and rollForward: latestMinor. The workflows will install .NET 11.0.x (latest available preview) via the explicit version list, avoiding the specific version requirement that was causing the installation error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

支持donet11

2 participants