Edit

Share via


Breaking changes in .NET 7

If you're migrating an app to .NET 7, 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.

ASP.NET Core

Core .NET libraries

Configuration

Title Type of change
System.diagnostics entry in app.config Binary incompatible

Cryptography

Deployment

Title Type of change
All assemblies trimmed by default Source incompatible
Multi-level lookup is disabled Binary incompatible
x86 host path on 64-bit Windows Behavioral change
TrimmerDefaultAction is deprecated Source incompatible

Entity Framework Core

Breaking changes in EF Core 7

Extensions

Title Type of change
Binding config to dictionary extends values Behavioral change
ContentRootPath for apps launched by Windows Shell Binary incompatible
Environment variable prefixes Binary incompatible

Globalization

Title Type of change
Globalization APIs use ICU libraries on Windows Server Binary incompatible

Interop

Title Type of change
RuntimeInformation.OSArchitecture under emulation Binary incompatible

.NET MAUI

Title Type of change
Constructors accept base interface instead of concrete type Binary incompatible
Flow direction helper methods removed Binary/source incompatible
New UpdateBackground parameter Binary incompatible
ScrollToRequest property renamed Binary/source incompatible
Some Windows APIs are removed Binary/source incompatible

Networking

Title Type of change
AllowRenegotiation default is false Binary/source incompatible
Custom ping payloads on Linux Binary incompatible
Socket.End methods don't throw ObjectDisposedException Binary incompatible

SDK and MSBuild

Serialization

Windows Forms

Title Type of change
Obsoletions and warnings Source incompatible
Some APIs throw ArgumentNullException Binary incompatible

WPF

Title Type of change
Restored drag-and-drop operations behavior on text editors Behavioral change

XML and XSLT

Title Type of change
XmlSecureResolver is obsolete Binary/source incompatible

See also


Additional resources