[Breaking change]: Diagnostic ID changed for Obsoletion of GetCompressedStack/SetCompressedStack #25464
Closed
1 of 2 tasks
Labels
breaking-change
Indicates a .NET Core breaking change
🏁 Release: .NET 6
Issues and PRs for the .NET 6 release
source incompatible
Source code may encounter a breaking change in behavior when targeting the new version.
Description
The GetCompressedStack and SetCompressedStack APIs were previously marked as
[Obsolete]
with the defaultCS0618
diagnostic ID and a message providing guidance. In .NET 6, the[Obsolete]
attribute has been updated to capture a more accurate message and to group this obsoletion with other Code Access Security obsoletions covered by theSYSLIB0003
diagnostic ID.Introduced in dotnet/runtime#56874.
Version
.NET 6 RC1
Previous behavior
Referencing
GetCompressedStack
orSetCompressedStack
would result in an obsoletion warning with the default diagnostic ID (CS0618
for C#).New behavior
Referencing
GetCompressedStack
orSetCompressedStack
will result in an obsoletion warning with theSYSLIB0003
diagnostic ID and an updated message. IfCS0618
was previously being suppressed andSYSLIB0003
is not yet being suppressed, a new build warning will be produced.Type of breaking change
Reason for change
The updated diagnostic ID and message more accurately reflects the current state of these APIs. The APIs are related to Code Access Security, which is deprecated in .NET Core / .NET 5+ and not supported.
Recommended action
Refer to the documentation for https://aka.ms/dotnet-warnings/SYSLIB0003, which is emitted by the new build warning, to determine the appropriate action.
Feature area
Core .NET libraries
Affected APIs
The text was updated successfully, but these errors were encountered: