Breaking changes in .NET 5
If you're migrating an app to .NET 5, the breaking changes listed here might affect you. Changes are grouped by technology area, such as ASP.NET Core or cryptography.
This article categorizes each breaking change as binary incompatible or source incompatible:
- Binary incompatible - Existing binaries may encounter a breaking change in behavior, such as failure to load or execute, or different run-time behavior.
- Source incompatible - Source code may encounter a breaking change in behavior when targeting the new runtime or using the new SDK or component. Behavior changes can include compile errors or different run-time behavior.
ASP.NET Core
Code analysis
| Title | Binary compatible | Source compatible |
|---|---|---|
| CA1416 warning | ✔️ | ❌ |
| CA1417 warning | ✔️ | ❌ |
| CA1831 warning | ✔️ | ❌ |
| CA2013 warning | ✔️ | ❌ |
| CA2014 warning | ✔️ | ❌ |
| CA2015 warning | ✔️ | ❌ |
| CA2200 warning | ✔️ | ❌ |
| CA2247 warning | ✔️ | ❌ |
Core .NET libraries
Cryptography
| Title | Binary compatible | Source compatible |
|---|---|---|
| Cryptography APIs not supported on browser | ❌ | ✔️ |
| Cryptography.Oid is init-only | ✔️ | ❌ |
| Default TLS cipher suites on Linux | ❌ | ✔️ |
| Create() overloads on cryptographic abstractions are obsolete | ✔️ | ❌ |
| Default FeedbackSize value changed | ✔️ | ❌ |
Entity Framework Core
Breaking changes in EF Core 5.0
Globalization
| Title | Binary compatible | Source compatible |
|---|---|---|
| Use ICU libraries on Windows | ❌ | ✔️ |
| StringInfo and TextElementEnumerator are UAX29-compliant | ❌ | ✔️ |
| Unicode category changed for Latin-1 characters | ✔️ | ❌ |
| TextInfo.ListSeparator values changed | ✔️ | ❌ |
Interop
| Title | Binary compatible | Source compatible |
|---|---|---|
| Support for WinRT is removed | ❌ | ✔️ |
| Casting RCW to InterfaceIsIInspectable throws exception | ❌ | ✔️ |
| No A/W suffix probing on non-Windows platforms | ❌ | ✔️ |
Networking
| Title | Binary compatible | Source compatible |
|---|---|---|
| Cookie path handling conforms to RFC 6265 | ✔️ | ❌ |
| LocalEndPoint is updated after calling SendToAsync | ✔️ | ❌ |
| MulticastOption.Group doesn't accept null | ✔️ | ❌ |
| Streams allow successive Begin operations | ❌ | ✔️ |
| WinHttpHandler removed from .NET runtime | ❌ | ✔️ |
SDK
Security
| Title | Binary compatible | Source compatible |
|---|---|---|
| Code access security APIs are obsolete | ✔️ | ❌ |
| PrincipalPermissionAttribute is obsolete | ✔️ | ❌ |
| UTF-7 code paths are obsolete | ✔️ | ❌ |
Serialization
Windows Forms
| Title | Binary compatible | Source compatible |
|---|---|---|
| Native code can't access Windows Forms objects | ✔️ | ❌ |
| OutputType set to WinExe | ❌ | ✔️ |
| DataGridView doesn't reset custom fonts | ✔️ | ❌ |
| Methods throw ArgumentException | ✔️ | ❌ |
| Methods throw ArgumentNullException | ✔️ | ❌ |
| Properties throw ArgumentOutOfRangeException | ✔️ | ❌ |
| TextFormatFlags.ModifyString is obsolete | ✔️ | ❌ |
| DataGridView APIs throw InvalidOperationException | ✔️ | ❌ |
| WinForms apps use Microsoft.NET.Sdk | ❌ | ✔️ |
| Removed status bar controls | ✔️ | ❌ |
WPF
| Title | Binary compatible | Source compatible |
|---|---|---|
| OutputType set to WinExe | ❌ | ✔️ |
| WPF apps use Microsoft.NET.Sdk | ❌ | ✔️ |
Maklum balas
Kirim dan lihat maklum balas untuk