-
Notifications
You must be signed in to change notification settings - Fork 944
.NET: Upgrade to .NET 10 #2128
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
.NET: Upgrade to .NET 10 #2128
Conversation
stephentoub
commented
Nov 12, 2025
- 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
dotnet/src/Microsoft.Agents.AI.AzureAI.Persistent/Microsoft.Agents.AI.AzureAI.Persistent.csproj
Show resolved
Hide resolved
There was a problem hiding this 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 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
| File | Description |
|---|---|
| dotnet/global.json | Updated SDK version to 10.0.100 with minor rollForward policy |
| dotnet/Directory.Build.props | Updated LangVersion to latest and redefined target frameworks for net10.0 |
| dotnet/Directory.Packages.props | Updated Microsoft.AspNetCore packages to 10.0.0 |
| dotnet/tests/Directory.Build.props | Updated default test target frameworks to net10.0;net472 |
| dotnet/samples/Directory.Build.props | Updated sample target frameworks to net10.0;net472 |
| Multiple .csproj files | Removed TargetFrameworks property and updated to net10.0 |
| Multiple .csproj files | Conditionally included System.Net.ServerSentEvents and related packages for pre-net10.0 frameworks |
| Multiple .cs files | Adopted collection expressions, field-backed properties, and pattern matching improvements |
| PowerShell scripts | Updated paths from net9.0 to net10.0 |
| Documentation files | Updated .NET version references from 9.0 to 10.0 |
| GitHub workflows | Updated CI/CD workflows to use .NET 10.0 |
dotnet/samples/GettingStarted/AgentWithMemory/AgentWithMemory_Step02_MemoryUsingMem0/Program.cs
Show resolved
Hide resolved
dotnet/src/Microsoft.Agents.AI.Hosting.OpenAI/Responses/Converters/ItemContentConverter.cs
Show resolved
Hide resolved
crickman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
@crickman, has this happened? |
Yes, merged this morning. |
crickman
left a comment
There was a problem hiding this comment.
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.
1656a1e to
b2c7de3
Compare
b2c7de3 to
bfe4a2b
Compare
bfe4a2b to
6315689
Compare