Navigating Breaking Changes in .NET 10
.NET Development
A comprehensive guide to breaking changes introduced in .NET 10, categorized by technology area to assist developers migrating applications. Includes definitions of binary, source, and behavioral incompatibilities.
This document outlines significant breaking changes introduced in .NET 10, crucial for developers migrating existing applications. Understanding these changes, categorized by technology area such as ASP.NET Core, Windows Forms, or Core .NET libraries, is essential for a smooth transition.
Each breaking change is classified into one of the following types:
- Binary incompatible: Existing binaries might fail to load or execute when run against the new runtime or component, necessitating recompilation.
- Source incompatible: Existing source code may require modifications to compile successfully when recompiled using the new SDK or component, or when targeting the new runtime.
- Behavioral change: Existing code and binaries might exhibit different behavior at runtime. If the new behavior is undesirable, updates and recompilation of the existing code would be required.
Important Note: This article is a work in progress and does not yet constitute a comprehensive list of all breaking changes in .NET 10.
ASP.NET Core
- Cookie login redirects disabled for known API endpoints: Behavioral change
- Deprecation of
WithOpenApiextension method: Source incompatible - Exception diagnostics suppressed when
TryHandleAsyncreturns true: Behavioral change IActionContextAccessorandActionContextAccessorare obsolete: Source incompatible/behavioral changeIncludeOpenAPIAnalyzersproperty and MVC API analyzers are deprecated: Source incompatibleIPNetworkandForwardedHeadersOptions.KnownNetworksare obsolete: Source incompatibleMicrosoft.Extensions.ApiDescription.Clientpackage deprecated: Source incompatible- Razor runtime compilation is obsolete: Source incompatible
WebHostBuilder,IWebHost, andWebHostare obsolete: Source incompatible
Containers
- Default .NET images use Ubuntu: Behavioral change
Core .NET libraries
ActivitySource.CreateActivityandActivitySource.StartActivitybehavior change: Behavioral change- Arm64 SVE nonfaulting loads require mask: Binary/source incompatible
BufferedStream.WriteByteno longer performs implicit flush: Behavioral change- C# 14 overload resolution with span parameters: Behavioral change
- Consistent shift behavior in generic math: Behavioral change
- Default trace context propagator updated to W3C standard: Behavioral change
DriveInfo.DriveFormatreturns Linux filesystem types: Behavioral changeDynamicallyAccessedMembersannotation removed fromDefaultValueAttributector: Binary/source incompatible- Explicit struct
Sizedisallowed withInlineArray: Binary incompatible FilePatternMatch.Stemchanged to non-nullable: Source incompatible/behavioral changeGnuTarEntryandPaxTarEntryno longer includesatimeandctimeby default: Behavioral change- LDAP
DirectoryControlparsing is now more stringent: Behavioral change - MacCatalyst version normalization: Behavioral change
- .NET runtime no longer provides default termination signal handlers: Behavioral change
System.Linq.AsyncEnumerableincluded in core libraries: Source incompatibleType.MakeGenericSignatureTypeargument validation: Behavioral change
Cryptography
- Composite MLDsa updated to draft-08: Behavioral change
CoseSigner.Keycan be null: Behavioral/source incompatible change- MLDsa and SlhDsa 'SecretKey' members renamed: Source incompatible
- OpenSSL cryptographic primitives aren't supported on macOS: Behavioral change
- OpenSSL 1.1.1 or later required on Unix: Behavioral change
X500DistinguishedNamevalidation is stricter: Behavioral changeX509CertificateandPublicKeykey parameters can be null: Behavioral/source incompatible change- Environment variable renamed to
DOTNET_OPENSSL_VERSION_OVERRIDE: Behavioral change
Entity Framework Core
- Breaking changes in EF Core 10 (Note: Details are not provided in the source for EF Core beyond this title.)
Extensions
BackgroundServiceruns all ofExecuteAsyncas a Task: Behavioral change- Fix issues in
GetKeyedService()andGetKeyedServices()withAnyKey: Behavioral change - Null values preserved in configuration: Behavioral change
- Message no longer duplicated in Console log output: Behavioral change
ProviderAliasAttributemoved toMicrosoft.Extensions.Logging.Abstractionsassembly: Source incompatible- Removed
DynamicallyAccessedMembersannotation from trim-unsafeMicrosoft.Extensions.Configurationcode: Binary incompatible
Globalization
- Environment variable renamed to
DOTNET_ICU_VERSION_OVERRIDE: Behavioral change
Install tool
dotnet.acquireAPI for VS Code no longer always downloads latest: Behavioral change
Interop
- Casting
IDispatchExCOM object toIReflectfails: Behavioral change - Single-file apps no longer look for native libraries in executable directory: Behavioral change
- Specifying
DllImportSearchPath.AssemblyDirectoryonly searches the assembly directory: Behavioral change
Networking
- HTTP/3 support disabled by default with
PublishTrimmed: Source incompatible - Streaming HTTP responses enabled by default in browser HTTP clients: Behavioral change
- Uri length limits removed: Behavioral change
Reflection
- More restricted annotations on
InvokeMember/FindMembers/DeclaredMembers: Behavioral/source incompatible
SDK and MSBuild
- .NET CLI
--interactivedefaults totruein user scenarios: Behavioral change dotnetCLI commands log non-command-relevant data to stderr: Behavioral change- .NET tool packaging creates
RuntimeIdentifier-specific tool packages: Behavioral change - Default workload configuration from 'loose manifests' to 'workload sets' mode: Behavioral change
- Code coverage
EnableDynamicNativeInstrumentationdefaults to false: Behavioral change dnx.ps1file is no longer included in .NET SDK: Source incompatibledotnet new slndefaults toSLNXfile format: Behavioral changedotnet package listperforms restore: Behavioral changedotnet restoreaudits transitive packages: Behavioral changedotnet tool install --localcreates manifest by default: Behavioral changedotnet watchlogs to stderr instead of stdout: Behavioral changeproject.jsonnot supported indotnet restore: Source incompatible- SHA-1 fingerprint support deprecated in
dotnet nuget sign: Behavioral change MSBUILDCUSTOMBUILDEVENTWARNINGescape hatch removed: Behavioral change- MSBuild custom culture resource handling: Behavioral change
NU1510is raised for direct references pruned by NuGet: Source incompatible- NuGet packages with no runtime assets aren't included in
deps.json: Source incompatible PackageReferencewithout a version raises an error: Behavioral changePrunePackageReferenceprivatizes direct prunable references: Behavioral change- HTTP warnings promoted to errors in
dotnet package listanddotnet package search: Behavioral/source incompatible change NUGET_ENABLE_ENHANCED_HTTP_RETRYenvironment variable removed: Behavioral change- NuGet logs an error for invalid package IDs: Behavioral change
ToolCommandNamenot set for non-tool packages: Source incompatible
Serialization
System.Text.Jsonchecks for property name conflicts: Behavioral changeXmlSerializerno longer ignores properties marked withObsoleteAttribute: Behavioral change
Windows Forms
- API obsoletions: Source incompatible
- Applications referencing both WPF and WinForms must disambiguate
MenuItemandContextMenutypes: Source incompatible - Renamed parameter in
HtmlElement.InsertAdjacentElement: Source incompatible TreeViewcheckbox image truncation: Behavioral changeStatusStripuses System RenderMode by default: Behavioral changeSystem.Drawing OutOfMemoryExceptionchanged toExternalException: Behavioral change
Windows Presentation Foundation (WPF)
- Empty
ColumnDefinitionsandRowDefinitionsare disallowed: Source incompatible - Incorrect usage of
DynamicResourcecauses application crash: Source incompatible/behavioral change