Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 93 additions & 92 deletions docs/core/compatibility/7.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Breaking changes in .NET 7
titleSuffix: ""
description: Navigate to the breaking changes in .NET 7.
ms.date: 01/04/2022
ms.date: 05/18/2023
no-loc: [Blazor, Razor, Kestrel]
---
# Breaking changes in .NET 7
Expand All @@ -13,88 +13,89 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff

## ASP.NET Core

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [API controller actions try to infer parameters from DI](aspnet-core/7.0/api-controller-action-parameters-di.md) | ✔️ | ❌ | Preview 2 |
| [ASPNET-prefixed environment variable precedence](aspnet-core/7.0/environment-variable-precedence.md) | ✔️ | ✔️ | Preview 3 |
| [AuthenticateAsync for remote auth providers](aspnet-core/7.0/authenticateasync-anonymous-request.md) | ✔️ | ❌ | RC 1 |
| [Authentication in WebAssembly apps](aspnet-core/7.0/wasm-app-authentication.md) | ❌ | ✔️ | RC 1 |
| [Default authentication scheme](aspnet-core/7.0/default-authentication-scheme.md) | ❌ | ✔️ | Preview 7 |
| [Event IDs for some Microsoft.AspNetCore.Mvc.Core log messages changed](aspnet-core/7.0/microsoft-aspnetcore-mvc-core-log-event-ids.md) | ❌ | ✔️ | Preview 3 |
| [Fallback file endpoints](aspnet-core/7.0/fallback-file-endpoints.md) | ❌ | ✔️ | RC 2 |
| [IHubClients and IHubCallerClients hide members](aspnet-core/7.0/ihubclients-ihubcallerclients.md) | ✔️ | ❌ | |
| [Kestrel: Default HTTPS binding removed](aspnet-core/7.0/https-binding-kestrel.md) | ❌ | ✔️ | Preview 6 |
| [Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv and libuv.dll removed](aspnet-core/7.0/libuv-transport-dll-removed.md) | ❌ | ❌ | Preview 1 |
| [Microsoft.Data.SqlClient updated to 4.0.1](aspnet-core/7.0/microsoft-data-sqlclient-updated-to-4-0-1.md) | ✔️ | ❌ | Preview 2 |
| [Middleware no longer defers to endpoint with null request delegate](aspnet-core/7.0/middleware-null-requestdelegate.md) | ❌ | ✔️ | Preview 7 |
| [MVC's detection of an empty body in model binding changed](aspnet-core/7.0/mvc-empty-body-model-binding.md) | ❌ | ✔️ | Preview 3 |
| [Output caching API changes](aspnet-core/7.0/output-caching-renames.md) | ❌ | ❌ | RC 2 |
| [SignalR Hub methods try to resolve parameters from DI](aspnet-core/7.0/signalr-hub-method-parameters-di.md) | ✔️ | ❌ | Preview 2 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [API controller actions try to infer parameters from DI](aspnet-core/7.0/api-controller-action-parameters-di.md) | ✔️ | ❌ |
| [ASPNET-prefixed environment variable precedence](aspnet-core/7.0/environment-variable-precedence.md) | ✔️ | ✔️ |
| [AuthenticateAsync for remote auth providers](aspnet-core/7.0/authenticateasync-anonymous-request.md) | ✔️ | ❌ |
| [Authentication in WebAssembly apps](aspnet-core/7.0/wasm-app-authentication.md) | ❌ | ✔️ |
| [Default authentication scheme](aspnet-core/7.0/default-authentication-scheme.md) | ❌ | ✔️ |
| [Event IDs for some Microsoft.AspNetCore.Mvc.Core log messages changed](aspnet-core/7.0/microsoft-aspnetcore-mvc-core-log-event-ids.md) | ❌ | ✔️ |
| [Fallback file endpoints](aspnet-core/7.0/fallback-file-endpoints.md) | ❌ | ✔️ |
| [IHubClients and IHubCallerClients hide members](aspnet-core/7.0/ihubclients-ihubcallerclients.md) | ✔️ | ❌ |
| [Kestrel: Default HTTPS binding removed](aspnet-core/7.0/https-binding-kestrel.md) | ❌ | ✔️ |
| [Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv and libuv.dll removed](aspnet-core/7.0/libuv-transport-dll-removed.md) | ❌ | ❌ |
| [Microsoft.Data.SqlClient updated to 4.0.1](aspnet-core/7.0/microsoft-data-sqlclient-updated-to-4-0-1.md) | ✔️ | ❌ |
| [Middleware no longer defers to endpoint with null request delegate](aspnet-core/7.0/middleware-null-requestdelegate.md) | ❌ | ✔️ |
| [MVC's detection of an empty body in model binding changed](aspnet-core/7.0/mvc-empty-body-model-binding.md) | ❌ | ✔️ |
| [Output caching API changes](aspnet-core/7.0/output-caching-renames.md) | ❌ | ❌ |
| [SignalR Hub methods try to resolve parameters from DI](aspnet-core/7.0/signalr-hub-method-parameters-di.md) | ✔️ | ❌ |

## Core .NET libraries

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [API obsoletions with default diagnostic ID](core-libraries/7.0/obsolete-apis-with-default-diagnostic.md) | ✔️ | ❌ | Preview 3 |
| [API obsoletions with non-default diagnostic IDs](core-libraries/7.0/obsolete-apis-with-custom-diagnostics.md) | ✔️ | ❌ | Preview 1 |
| [BinaryFormatter serialization APIs produce compiler errors](serialization/7.0/binaryformatter-apis-produce-errors.md) | ✔️ | ❌ | RC 1 |
| [BrotliStream no longer allows undefined CompressionLevel values](core-libraries/7.0/brotlistream-ctor.md) | ❌ | ✔️ | |
| [C++/CLI projects in Visual Studio](core-libraries/7.0/cpluspluscli-compiler-version.md) | ✔️ | ❌ | Preview 3 |
| [Changes to reflection invoke API exceptions](core-libraries/7.0/reflection-invoke-exceptions.md) | ❌ | ✔️ | Preview 4 |
| [Collectible Assembly in non-collectible AssemblyLoadContext](core-libraries/7.0/collectible-assemblies.md) | ❌ | ✔️ | Preview 5 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [API obsoletions with default diagnostic ID](core-libraries/7.0/obsolete-apis-with-default-diagnostic.md) | ✔️ | ❌ |
| [API obsoletions with non-default diagnostic IDs](core-libraries/7.0/obsolete-apis-with-custom-diagnostics.md) | ✔️ | ❌ |
| [BinaryFormatter serialization APIs produce compiler errors](serialization/7.0/binaryformatter-apis-produce-errors.md) | ✔️ | ❌ |
| [BrotliStream no longer allows undefined CompressionLevel values](core-libraries/7.0/brotlistream-ctor.md) | ❌ | ✔️ |
| [C++/CLI projects in Visual Studio](core-libraries/7.0/cpluspluscli-compiler-version.md) | ✔️ | ❌ |
| [Changes to reflection invoke API exceptions](core-libraries/7.0/reflection-invoke-exceptions.md) | ❌ | ✔️ |
| [Collectible Assembly in non-collectible AssemblyLoadContext](core-libraries/7.0/collectible-assemblies.md) | ❌ | ✔️ |
| [DateTime addition methods precision change](core-libraries/7.0/datetime-add-precision.md) | ✔️ | ✔️ |
| [Equals method behavior change for NaN](core-libraries/7.0/equals-nan.md) | ❌ | ✔️ | Preview 5 |
| [Generic type constraint on PatternContext\<T>](core-libraries/7.0/patterncontext-generic-constraint.md) | ❌ | ❌ | Preview 3 |
| [Legacy FileStream strategy removed](core-libraries/7.0/filestream-compat-switch.md) | ❌ | ✔️ | Preview 1 |
| [Library support for older frameworks](core-libraries/7.0/old-framework-support.md) | ❌ | ❌ | Preview 1 |
| [Maximum precision for numeric format strings](core-libraries/7.0/max-precision-numeric-format-strings.md) | ❌ | ✔️ | RC 1 |
| [SerializationFormat.Binary is obsolete](serialization/7.0/serializationformat-binary.md) | ❌ | ❌ | Preview 2 |
| [System.Runtime.CompilerServices.Unsafe NuGet package](core-libraries/7.0/unsafe-package.md) | ✔️ | ✔️ | Preview 3 |
| [Time fields on symbolic links](core-libraries/7.0/symbolic-link-timestamps.md) | ❌ | ✔️ | Preview 1 |
| [Tracking linked cache entries](core-libraries/7.0/memorycache-tracking.md) | ❌ | ✔️ | Preview 1 |
| [Validate CompressionLevel for BrotliStream](core-libraries/7.0/compressionlevel-validation.md) | ❌ | ✔️ | Preview 1 |
| [Equals method behavior change for NaN](core-libraries/7.0/equals-nan.md) | ❌ | ✔️ |
| [Generic type constraint on PatternContext\<T>](core-libraries/7.0/patterncontext-generic-constraint.md) | ❌ | ❌ |
| [Legacy FileStream strategy removed](core-libraries/7.0/filestream-compat-switch.md) | ❌ | ✔️ |
| [Library support for older frameworks](core-libraries/7.0/old-framework-support.md) | ❌ | ❌ |
| [Maximum precision for numeric format strings](core-libraries/7.0/max-precision-numeric-format-strings.md) | ❌ | ✔️ |
| [SerializationFormat.Binary is obsolete](serialization/7.0/serializationformat-binary.md) | ❌ | ❌ |
| [System.Drawing.Common config switch removed](core-libraries/7.0/system-drawing.md) | ✔️ | ✔️ |
| [System.Runtime.CompilerServices.Unsafe NuGet package](core-libraries/7.0/unsafe-package.md) | ✔️ | ✔️ |
| [Time fields on symbolic links](core-libraries/7.0/symbolic-link-timestamps.md) | ❌ | ✔️ |
| [Tracking linked cache entries](core-libraries/7.0/memorycache-tracking.md) | ❌ | ✔️ |
| [Validate CompressionLevel for BrotliStream](core-libraries/7.0/compressionlevel-validation.md) | ❌ | ✔️ |

## Configuration

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [System.diagnostics entry in app.config](configuration/7.0/diagnostics-config-section.md) | ❌ | ✔️ | RC 1 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [System.diagnostics entry in app.config](configuration/7.0/diagnostics-config-section.md) | ❌ | ✔️ |

## Cryptography

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [Decrypting EnvelopedCms doesn't double unwrap](cryptography/7.0/decrypt-envelopedcms.md) | ❌ | ✔️ | Preview 5 |
| [Dynamic X509ChainPolicy verification time](cryptography/7.0/x509chainpolicy-verification-time.md) | ❌ | ✔️ | Preview 7 |
| [X500DistinguishedName parsing of friendly names](cryptography/7.0/x500-distinguished-names.md) | ❌ | ✔️ | Preview 5 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [Decrypting EnvelopedCms doesn't double unwrap](cryptography/7.0/decrypt-envelopedcms.md) | ❌ | ✔️ |
| [Dynamic X509ChainPolicy verification time](cryptography/7.0/x509chainpolicy-verification-time.md) | ❌ | ✔️ |
| [X500DistinguishedName parsing of friendly names](cryptography/7.0/x500-distinguished-names.md) | ❌ | ✔️ |

## Deployment

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [All assemblies trimmed by default](deployment/7.0/trim-all-assemblies.md) | ✔️ | ❌ | Preview 7 |
| [Multi-level lookup is disabled](deployment/7.0/multilevel-lookup.md) | ❌ | ✔️ | Preview 4 |
| [x86 host path on 64-bit Windows](deployment/7.0/x86-host-path.md) | ✔️ | ✔️ | Preview 6 |
| [TrimmerDefaultAction is deprecated](deployment/7.0/deprecated-trimmer-default-action.md) | ✔️ | ❌ | Preview 7 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [All assemblies trimmed by default](deployment/7.0/trim-all-assemblies.md) | ✔️ | ❌ |
| [Multi-level lookup is disabled](deployment/7.0/multilevel-lookup.md) | ❌ | ✔️ |
| [x86 host path on 64-bit Windows](deployment/7.0/x86-host-path.md) | ✔️ | ✔️ |
| [TrimmerDefaultAction is deprecated](deployment/7.0/deprecated-trimmer-default-action.md) | ✔️ | ❌ |

## Extensions

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [ContentRootPath for apps launched by Windows Shell](extensions/7.0/contentrootpath-hosted-app.md) | ❌ | ✔️ | Preview 6 |
| [Environment variable prefixes](extensions/7.0/environment-variable-prefix.md) | ❌ | ✔️ | Preview 4 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [ContentRootPath for apps launched by Windows Shell](extensions/7.0/contentrootpath-hosted-app.md) | ❌ | ✔️ |
| [Environment variable prefixes](extensions/7.0/environment-variable-prefix.md) | ❌ | ✔️ |

## Globalization

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [Globalization APIs use ICU libraries on Windows Server](globalization/7.0/icu-globalization-api.md) | ❌ | ✔️ | RC 1 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [Globalization APIs use ICU libraries on Windows Server](globalization/7.0/icu-globalization-api.md) | ❌ | ✔️ |

## Interop

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [RuntimeInformation.OSArchitecture under emulation](interop/7.0/osarchitecture-emulation.md) | ❌ | ✔️ | RC 1 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [RuntimeInformation.OSArchitecture under emulation](interop/7.0/osarchitecture-emulation.md) | ❌ | ✔️ |

## .NET MAUI

Expand All @@ -108,49 +109,49 @@ If you're migrating an app to .NET 7, the breaking changes listed here might aff

## Networking

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [AllowRenegotiation default is false](networking/7.0/allowrenegotiation-default.md) | ❌ | ❌ | Preview 3 |
| [Custom ping payloads on Linux](networking/7.0/ping-custom-payload-linux.md) | ❌ | ✔️ | Preview 2 |
| [Socket.End methods don't throw ObjectDisposedException](networking/7.0/socket-end-closed-sockets.md) | ❌ | ✔️ | Preview 7 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [AllowRenegotiation default is false](networking/7.0/allowrenegotiation-default.md) | ❌ | ❌ |
| [Custom ping payloads on Linux](networking/7.0/ping-custom-payload-linux.md) | ❌ | ✔️ |
| [Socket.End methods don't throw ObjectDisposedException](networking/7.0/socket-end-closed-sockets.md) | ❌ | ✔️ |

## SDK and MSBuild

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [Automatic RuntimeIdentifier for certain projects](sdk/7.0/automatic-runtimeidentifier.md) | ✔️ | ❌ | 7.0.100 |
| [Automatic RuntimeIdentifier for publish only](sdk/7.0/automatic-rid-publish-only.md) | ❌ | ❌ | 7.0.200 |
| [CLI console output uses UTF-8](sdk/8.0/console-encoding.md) | ❌ | ❌ | 7.0.3xx |
| [Console encoding not UTF-8 after completion](sdk/8.0/console-encoding-fix.md) | ❌ | ✔️ | 7.0.300 |
| [MSBuild serialization of custom types in .NET 7](sdk/7.0/custom-serialization.md) | ❌ | ❌ | 7.0.100 |
| [Side-by-side SDK installations](sdk/7.0/side-by-side-install.md) | ❌ | ❌ | 7.0.100 |
| [Version requirements for .NET 7 SDK](sdk/7.0/vs-msbuild-version.md) | ✔️ | ✔️ | 7.0.100 |
| [dotnet test: switch `-a` to alias `--arch` instead of `--test-adapter-path`](https://github.com/dotnet/sdk/issues/21389) | ❌ | ❌ | Preview 1 |
| [dotnet test: switch `-r` to alias `--runtime` instead of `--results-dir`](https://github.com/dotnet/sdk/issues/21952) | ❌ | ❌ | Preview 1 |
| [`--output` option no longer is valid for solution-level commands](sdk/7.0/solution-level-output-no-longer-valid.md) | ❌ | ❌ | 7.0.200 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [Automatic RuntimeIdentifier for certain projects](sdk/7.0/automatic-runtimeidentifier.md) | ✔️ | ❌ |
| [Automatic RuntimeIdentifier for publish only](sdk/7.0/automatic-rid-publish-only.md) | ❌ | ❌ |
| [CLI console output uses UTF-8](sdk/8.0/console-encoding.md) | ❌ | ❌ |
| [Console encoding not UTF-8 after completion](sdk/8.0/console-encoding-fix.md) | ❌ | ✔️ |
| [MSBuild serialization of custom types in .NET 7](sdk/7.0/custom-serialization.md) | ❌ | ❌ |
| [Side-by-side SDK installations](sdk/7.0/side-by-side-install.md) | ❌ | ❌ |
| [Version requirements for .NET 7 SDK](sdk/7.0/vs-msbuild-version.md) | ✔️ | ✔️ |
| [dotnet test: switch `-a` to alias `--arch` instead of `--test-adapter-path`](https://github.com/dotnet/sdk/issues/21389) | ❌ | ❌ |
| [dotnet test: switch `-r` to alias `--runtime` instead of `--results-dir`](https://github.com/dotnet/sdk/issues/21952) | ❌ | ❌ |
| [`--output` option no longer is valid for solution-level commands](sdk/7.0/solution-level-output-no-longer-valid.md) | ❌ | ❌ |

## Serialization

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [DataContractSerializer retains sign when deserializing -0](serialization/7.0/datacontractserializer-negative-sign.md) | ❌ | ✔️ | RC 1 |
| [Deserialize Version type with leading or trailing whitespace](serialization/7.0/deserialize-version-with-whitespace.md) | ❌ | ✔️ | Preview 1 |
| [JsonSerializerOptions copy constructor includes JsonSerializerContext](serialization/7.0/jsonserializeroptions-copy-constructor.md) | ❌ | ✔️ | Preview 7 |
| [Polymorphic serialization for object types](serialization/7.0/polymorphic-serialization.md) | ❌ | ✔️ | RC 1 |
| [System.Text.Json source generator fallback](serialization/7.0/reflection-fallback.md) | ❌ | ✔️ | Preview 7 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [DataContractSerializer retains sign when deserializing -0](serialization/7.0/datacontractserializer-negative-sign.md) | ❌ | ✔️ |
| [Deserialize Version type with leading or trailing whitespace](serialization/7.0/deserialize-version-with-whitespace.md) | ❌ | ✔️ |
| [JsonSerializerOptions copy constructor includes JsonSerializerContext](serialization/7.0/jsonserializeroptions-copy-constructor.md) | ❌ | ✔️ |
| [Polymorphic serialization for object types](serialization/7.0/polymorphic-serialization.md) | ❌ | ✔️ |
| [System.Text.Json source generator fallback](serialization/7.0/reflection-fallback.md) | ❌ | ✔️ |

## Windows Forms

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [Obsoletions and warnings](windows-forms/7.0/obsolete-apis.md) | ✔️ | ❌ | Preview 1 and RC 1 |
| [Some APIs throw ArgumentNullException](windows-forms/7.0/apis-throw-argumentnullexception.md) | ❌ | ✔️ | Preview 1 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [Obsoletions and warnings](windows-forms/7.0/obsolete-apis.md) | ✔️ | ❌ |
| [Some APIs throw ArgumentNullException](windows-forms/7.0/apis-throw-argumentnullexception.md) | ❌ | ✔️ |

## XML and XSLT

| Title | Binary compatible | Source compatible | Introduced |
| - | :-: | :-: | - |
| [XmlSecureResolver is obsolete](xml/7.0/xmlsecureresolver-obsolete.md) | ❌ | ❌ | RC 1 |
| Title | Binary compatible | Source compatible |
| - | :-: | :-: |
| [XmlSecureResolver is obsolete](xml/7.0/xmlsecureresolver-obsolete.md) | ❌ | ❌ |

## See also

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Alternatively, you can enable support for non-Windows platforms in .NET 6 by set
> [!NOTE]
>
> - This configuration switch was added to give cross-platform apps that depend heavily on this package time to migrate to more modern libraries. However, non-Windows bugs will not be fixed.
> - This switch is only available in .NET 6 and was removed in .NET 7.
> - This switch is only available in .NET 6 and was removed in .NET 7. For more information, see [System.Drawing.Common config switch removed](../7.0/system-drawing.md).

## Affected APIs

Expand Down
Loading