Breaking changes in .NET 6
If you're migrating an app to .NET 6, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or Windows Forms.
This article indicates whether each breaking change is binary compatible or source compatible:
- Binary compatible - Existing binaries will load and execute successfully without recompilation, and the run-time behavior won't change.
- Source compatible - Source code will compile successfully without changes when targeting the new runtime or using the new SDK or component.
ASP.NET Core
Containers
Title | Binary compatible | Source compatible |
---|---|---|
Default console logger formatting in container images | ✔️ | ❌ |
For information on other breaking changes for containers in .NET 6, see .NET 6 Container Release Notes.
Core .NET libraries
Cryptography
Title | Binary compatible | Source compatible |
---|---|---|
CreateEncryptor methods throw exception for incorrect feedback size | ❌ | ✔️ |
Deployment
Title | Binary compatible | Source compatible |
---|---|---|
x86 host path on 64-bit Windows | ✔️ | ✔️ |
Entity Framework Core
Extensions
Title | Binary compatible | Source compatible |
---|---|---|
AddProvider checks for non-null provider | ✔️ | ❌ |
FileConfigurationProvider.Load throws InvalidDataException | ✔️ | ❌ |
Repeated XML elements include index | ❌ | ✔️ |
Resolving disposed ServiceProvider throws exception | ✔️ | ❌ |
Globalization
Title | Binary compatible | Source compatible |
---|---|---|
Culture creation and case mapping in globalization-invariant mode |
Interop
Title | Binary compatible | Source compatible |
---|---|---|
Static abstract members in interfaces | ❌ | ✔️ |
JIT compiler
Title | Binary compatible | Source compatible |
---|---|---|
Coerce call arguments according to ECMA-335 | ✔️ | ✔️ |
Networking
Title | Binary compatible | Source compatible |
---|---|---|
Port removed from SPN for Kerberos and Negotiate | ❌ | ✔️ |
WebRequest, WebClient, and ServicePoint are obsolete | ✔️ | ❌ |
SDK
Serialization
Title | Binary compatible | Source compatible |
---|---|---|
DataContractSerializer retains sign when deserializing -0 | ❌ | ✔️ |
Default serialization format for TimeSpan | ❌ | ✔️ |
IAsyncEnumerable serialization | ✔️ | ❌ |
JSON source-generation API refactoring | ❌ | ✔️ |
JsonNumberHandlingAttribute on collection properties | ❌ | ✔️ |
New JsonSerializer source generator overloads | ❌ | ✔️ |
Windows Forms
XML and XSLT
Title | Binary compatible | Source compatible |
---|---|---|
XNodeReader.GetAttribute behavior for invalid index | ✔️ | ❌ |
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.