Added net10.0 targeting to all packages and flowed RC2 dependency versions.#6995
Added net10.0 targeting to all packages and flowed RC2 dependency versions.#6995joperezr merged 8 commits intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for .NET 10.0 target framework to the repository. The major version is updated from 9 to 10, and the existing infrastructure is extended to handle net10.0 alongside net9.0 and net8.0.
- Updates the major target framework from net9.0 to net10.0, while maintaining support for net9.0 and net8.0
- Adds package version definitions for .NET 10.0 RC2 dependencies from runtime and ASP.NET Core repos
- Fixes conditional compilation directives to use
NET9_0_OR_GREATERfor broader version coverage - Updates test code to use the modern
IHost/HostBuilderpattern instead of the obsoleteIWebHost/WebHostAPIs
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Build.props | Updates major framework version to 10 and adds net9.0 to the multi-targeting list |
| eng/Versions.props | Adds version properties for all .NET 10.0 RC2 package dependencies |
| eng/packages/General.props | Imports the new General-net10.props file |
| eng/packages/General-net9.props | Fixes condition to exclude when ForceLatestDotnetVersions is true |
| eng/packages/General-net10.props | Defines package versions for net10.0 target framework |
| eng/packages/General-LTS.props | Updates condition to exclude net10.0 from LTS package versions |
| eng/packages/TestOnly.props | Splits test package references to handle both net9.0 and net10.0 specifically |
| src/Shared/Shared.csproj | Conditionally excludes ServerSentEvents for net10.0 builds |
| src/Libraries/Microsoft.Extensions.AI.OpenAI/Microsoft.Extensions.AI.OpenAI.csproj | Conditionally disables shared ServerSentEvents injection for net10.0 |
| test/Shared/JsonSchemaExporter/JsonSchemaExporterTests.cs | Changes conditional compilation from NET9_0 to NET9_0_OR_GREATER |
| test/Libraries/Microsoft.Extensions.Http.Resilience.Tests/Resilience/GrpcResilienceTests.cs | Migrates from obsolete WebHost to modern HostBuilder pattern |
| test/Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests/Linux/AcceptanceTest.cs | Conditionally excludes System.Linq for NET10_0 to avoid conflicts with built-in extension methods |
.../Libraries/Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests/Linux/AcceptanceTest.cs
Show resolved
Hide resolved
|
@stephentoub there is a failure in MEAI.Abstraction tests. Could you take a look while I investigate the rest? |
I'm taking a look... |
|
@stephentoub / @eiriktsarpalis - The I'll continue investigating Saturday. |
…rovider Replace single clock.Advance/Wait uses with a polling loop that repeatedly advances the FakeTimeProvider and briefly waits to ensure ExecuteAsync's _delay_ is armed and completes across different runtimes. Add a maxAttempts guard and assertions to avoid indefinite hangs and to validate that a log record or publisher invocation actually occurred before proceeding.
…10 and skip on Windows Add NET10_0_OR_GREATER preprocessor block and apply ConditionalFact plus OSSkipCondition to avoid flaky behavior on Windows for .NET 10.
…eMonitoringServiceTests Replace NET10_0_OR_GREATER with NET10_0 so the ConditionalFact/OS skip targets .NET 10 only, and add the missing Microsoft.TestUtilities using required for OSSkipCondition. This stabilizes the RunTrackerAsync_IfProviderThrows_LogsError test behavior on .NET 10.
|
I fixed the JsonSerialization test. |
|
@joperezr looks like we now have timeouts in the |
I was trying to get this test to work but seems like a flaky test, failing different places. I'll just skip it for now and will assign it to someone on the ResourceMonitoring side so we can get this PR unblocked. |
This will make it such that all projects will also target Net10, as well as have a different dependency group so that they flow net10 dependency versions in order to not break out of the shared framework.
cc: @stephentoub @ericstj @jeffhandley
Microsoft Reviewers: Open in CodeFlow