Skip to content

.NET: Upgrade to .NET 10 - #2128

Merged
Stephen Toub (stephentoub) merged 2 commits into
microsoft:mainfrom
stephentoub:upgradenet10
Nov 22, 2025
Merged

.NET: Upgrade to .NET 10#2128
Stephen Toub (stephentoub) merged 2 commits into
microsoft:mainfrom
stephentoub:upgradenet10

Conversation

@stephentoub

Copy link
Copy Markdown
Member
  • Require .NET 10 SDK
  • Include net10.0 assets in all assemblies
  • Move net9.0-only targets to net10.0
  • Update LangVersion to latest
  • Remove complicated distinctions between debug target TFMs and release target TFMs
  • Remove unnecessary package dependencies when built-in to netcoreapp
  • Clean up some ifdefs
  • Clean up some analyzer warnings

CopilotAI review requested due to automatic review settings November 12, 2025 14:05
@markwallace-microsoftMark Wallace (markwallace-microsoft) added documentation Usage: [Issues, PRs], Target: documentation in the code base and learn docs .NET Usage: [Issues, PRs], Target: .Net workflows Usage: [Issues, PRs], Target: Workflows labels Nov 12, 2025
@github-actionsgithub-actionsBot changed the title Upgrade to .NET 10.NET: Upgrade to .NET 10Nov 12, 2025

CopilotAI 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 upgrades the .NET target framework from .NET 9.0 to .NET 10.0 across the entire codebase. The changes include updating SDK requirements, target frameworks in project files, package versions, and leveraging new C# language features available in .NET 10.0.

Key Changes:

  • Updated global SDK requirement to .NET 10.0.100 with minor rollForward policy
  • Migrated all projects from net9.0 to net10.0 target framework
  • Updated package versions to 10.0.0 where applicable and conditionally included packages only needed for pre-net10.0 frameworks
  • Adopted new C# language features including collection expressions, field-backed properties, and simplified syntax

Reviewed Changes

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

Show a summary per file
FileDescription
dotnet/global.jsonUpdated SDK version to 10.0.100 with minor rollForward policy
dotnet/Directory.Build.propsUpdated LangVersion to latest and redefined target frameworks for net10.0
dotnet/Directory.Packages.propsUpdated Microsoft.AspNetCore packages to 10.0.0
dotnet/tests/Directory.Build.propsUpdated default test target frameworks to net10.0;net472
dotnet/samples/Directory.Build.propsUpdated sample target frameworks to net10.0;net472
Multiple .csproj filesRemoved TargetFrameworks property and updated to net10.0
Multiple .csproj filesConditionally included System.Net.ServerSentEvents and related packages for pre-net10.0 frameworks
Multiple .cs filesAdopted collection expressions, field-backed properties, and pattern matching improvements
PowerShell scriptsUpdated paths from net9.0 to net10.0
Documentation filesUpdated .NET version references from 9.0 to 10.0
GitHub workflowsUpdated CI/CD workflows to use .NET 10.0

@crickmanChris (crickman) 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.

Stephen Toub (@stephentoub) - This is going to create conflicts with the v2 feature branch feature-foundry-agents. I wonder if this can wait until after Ignite, or perhaps just after Agents V2 Public Preview (at which time feature-foundry-agents will be merged to main).

I look forward to the upgrade to net10.0, but I'm just wondering about order of execution here.

@stephentoub

Copy link
Copy Markdown
MemberAuthor

Stephen Toub (@stephentoub) - This is going to create conflicts with the v2 feature branch feature-foundry-agents. I wonder if this can wait until after Ignite, or perhaps just after Agents V2 Public Preview (at which time feature-foundry-agents will be merged to main).

Chris (@crickman), has this happened?

@crickman

Copy link
Copy Markdown
Contributor

Stephen Toub (@stephentoub) - This is going to create conflicts with the v2 feature branch feature-foundry-agents. I wonder if this can wait until after Ignite, or perhaps just after Agents V2 Public Preview (at which time feature-foundry-agents will be merged to main).

Chris (@crickman), has this happened?

Yes, merged this morning.

@crickmanChris (crickman) 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.

Looks great, can't wait. I have no doubt you're on top of merging and resolving conflicts. Ping me if you need reapproval.

Aris Nguyen (arisng) pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
* Upgrade to .NET 10
- Require .NET 10 SDK
- Include net10.0 assets in all assemblies
- Move net9.0-only targets to net10.0
- Update LangVersion to latest
- Remove complicated distinctions between debug target TFMs and release target TFMs
- Remove unnecessary package dependencies when built into netcoreapp
- Clean up some ifdefs
- Clean up some analyzer warnings
* Fix CI
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationUsage: [Issues, PRs], Target: documentation in the code base and learn docs.NETUsage: [Issues, PRs], Target: .NetworkflowsUsage: [Issues, PRs], Target: Workflows

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants

@stephentoub@crickman@TaoChenOSU@rogerbarreto@DeagleGross@markwallace-microsoft