Edit

Share via


Breaking changes in .NET 10

If you're migrating an app to .NET 10, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or Windows Forms.

This article categorizes each breaking change as binary incompatible or source incompatible, or as a behavioral change:

  • Binary incompatible - When run against the new runtime or component, existing binaries may encounter a breaking change in behavior, such as failure to load or execute, and if so, require recompilation.

  • Source incompatible - When recompiled using the new SDK or component or to target the new runtime, existing source code may require source changes to compile successfully.

  • Behavioral change - Existing code and binaries may behave differently at run time. If the new behavior is undesirable, existing code would need to be updated and recompiled.

Note

This article is a work in progress. It's not a complete list of breaking changes in .NET 10.

ASP.NET Core

Title Type of change Introduced version
Cookie login redirects disabled for known API endpoints Behavioral change Preview 7
Deprecation of WithOpenApi extension method Source incompatible Preview 7
Exception diagnostics suppressed when TryHandleAsync returns true Behavioral change Preview 7
IActionContextAccessor and ActionContextAccessor are obsolete Source incompatible/behavioral change Preview 7
IncludeOpenAPIAnalyzers property and MVC API analyzers are deprecated Source incompatible Preview 7
IPNetwork and ForwardedHeadersOptions.KnownNetworks are obsolete Source incompatible Preview 7
Microsoft.Extensions.ApiDescription.Client package deprecated Source incompatible Preview 7
Razor run-time compilation is obsolete Source incompatible Preview 7

Containers

Title Type of change Introduced version
Default .NET images use Ubuntu Behavioral change Preview 1

Core .NET libraries

Title Type of change Introduced version
ActivitySource.CreateActivity and ActivitySource.StartActivity behavior change Behavioral change Preview 1
Arm64 SVE nonfaulting loads require mask Binary/source incompatible Preview 1
C# 14 overload resolution with span parameters Behavioral change Preview 1
Consistent shift behavior in generic math Behavioral change Preview 1
Default trace context propagator updated to W3C standard Behavioral change Preview 4
DriveInfo.DriveFormat returns Linux filesystem types Behavioral change Preview 6
DynamicallyAccessedMembers annotation removed from DefaultValueAttribute ctor Binary/source incompatible Preview 7
GnuTarEntry and PaxTarEntry no longer includes atime and ctime by default Behavioral change Preview 5
LDAP DirectoryControl parsing is now more stringent Behavioral change Preview 1
MacCatalyst version normalization Behavioral change Preview 1
.NET runtime no longer provides default SIGTERM signal handler Behavioral change Preview 5
Explicit struct Size disallowed with InlineArray Binary incompatible Preview 7
System.Linq.AsyncEnumerable included in core libraries Source incompatible Preview 1
YMM embedded rounding removed from AVX10.2 Behavioral change Preview 5

Entity Framework Core

Breaking changes in EF Core 10

Extensions

Title Type of change Introduced version
Null values preserved in configuration Behavioral change Preview 7
Message no longer duplicated in Console log output Behavioral change Preview 7
ProviderAliasAttribute moved to Microsoft.Extensions.Logging.Abstractions assembly Source incompatible Preview 4
Removed DynamicallyAccessedMembers annotation from trim-unsafe Microsoft.Extensions.Configuration code Binary incompatible Preview 6

Globalization

Title Type of change Introduced version
Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE Behavioral change Preview 1

Cryptography

Title Type of change Introduced version
CoseSigner.Key can be null Behavioral/source incompatible change Preview 7
OpenSSL cryptographic primitives aren't supported on macOS Behavioral change Preview 6
X500DistinguishedName validation is stricter Behavioral change Preview 1
X509Certificate and PublicKey key parameters can be null Behavioral/source incompatible change Preview 3
Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE Behavioral change Preview 1

Interop

Title Type of change Introduced version
Single-file apps no longer look for native libraries in executable directory Behavioral change Preview 6
Specifying DllImportSearchPath.AssemblyDirectory only searches the assembly directory Behavioral change Preview 5

Networking

Title Type of change Introduced version
HTTP/3 support disabled by default with PublishTrimmed Source incompatible Preview 6
HttpClient/SslStream default certificate revocation check mode changed to Online Behavioral change Preview 6
Streaming HTTP responses enabled by default in browser HTTP clients Behavioral change Preview 3
Uri length limits removed Behavioral change Preview 7

SDK and MSBuild

Title Type of change Introduced version
.NET CLI --interactive defaults to true in user scenarios Behavioral change Preview 3
.NET tool packaging invokes Publish instead of Build Behavioral change Preview 6
Default workload configuration from 'loose manifests' to 'workload sets' mode Behavioral change Preview 2
dotnet package list performs restore Behavioral change Preview 4
dotnet restore audits transitive packages Behavioral change Preview 3
project.json not supported in dotnet restore Source incompatible Preview 7
SHA-1 fingerprint support deprecated in dotnet nuget sign Behavioral change Preview 1
MSBUILDCUSTOMBUILDEVENTWARNING escape hatch removed Behavioral change Preview 1
MSBuild custom culture resource handling Behavioral change Preview 1
NU1510 is raised for direct references pruned by NuGet Source incompatible Preview 1
PackageReference without a version raises an error Behavioral change Preview 6
PrunePackageReference marks direct prunable references with PrivateAssets=all and IncludeAssets=none Behavioral change Preview 7
HTTP warnings promoted to errors in dotnet package list and dotnet package search Behavioral/source incompatible change Preview 4
NUGET_ENABLE_ENHANCED_HTTP_RETRY environment variable removed Behavioral change Preview 6

Windows Forms

Title Type of change Introduced version
API obsoletions Source incompatible Preview 1
Applications referencing both WPF and WinForms must disambiguate MenuItem and ContextMenu types Source incompatible Preview 1
Renamed parameter in HtmlElement.InsertAdjacentElement Source incompatible Preview 1
TreeView checkbox image truncation Behavioral change Preview 1
StatusStrip uses System RenderMode by default Behavioral change Preview 1
System.Drawing OutOfMemoryException changed to ExternalException Behavioral change Preview 5

Windows Presentation Foundation (WPF)

Title Type of change Introduced version
Empty ColumnDefinitions and RowDefinitions are disallowed Source incompatible Preview 5
Incorrect usage of DynamicResource causes application crash Source incompatible/behavioral change Preview 4