Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 5.11 KB

obsolete-apis-with-custom-diagnostics.md

File metadata and controls

66 lines (45 loc) · 5.11 KB
title titleSuffix description ms.date
Breaking change: .NET 9 obsoletions with custom IDs
Learn about the .NET 9 breaking change in core .NET libraries where some APIs have been marked as obsolete with a custom diagnostic ID.
05/09/2024

API obsoletions with non-default diagnostic IDs (.NET 9)

Some APIs have been marked as obsolete, starting in .NET 9. This breaking change is specific to APIs that have been marked as obsolete with a custom diagnostic ID. Suppressing the default obsoletion diagnostic ID, which is CS0618 for the C# compiler, does not suppress the warnings that the compiler generates when these APIs are used.

Change description

In previous .NET versions, these APIs can be used without any build warning. In .NET 9 and later versions, use of these APIs produces a compile-time warning or error with a custom diagnostic ID. The use of custom diagnostic IDs allows you to suppress the obsoletion warnings individually instead of blanket-suppressing all obsoletion warnings.

The following table lists the custom diagnostic IDs and their corresponding warning messages for obsoleted APIs.

| Diagnostic ID | Description | Severity | | - | - | | SYSLIB0009 | xref:System.Net.AuthenticationManager is not supported. Methods will no-op or throw xref:System.PlatformNotSupportedException. | Warning | | SYSLIB0054 | xref:System.Threading.Thread.VolatileRead%2A?displayProperty=nameWithType and xref:System.Threading.Thread.VolatileWrite%2A?displayProperty=nameWithType are obsolete. Use xref:System.Threading.Volatile.Read%2A?displayProperty=nameWithType or xref:System.Threading.Volatile.Write%2A?displayProperty=nameWithType instead. | Warning | | SYSLIB0055 | AdvSimd.ShiftRightLogicalRoundedNarrowingSaturate* methods with signed parameters are obsolete. Use the unsigned overloads instead. | Warning |

Version introduced

.NET 9

Type of breaking change

These obsoletions can affect source compatibility.

Recommended action

  • Follow the specific guidance provided for the each diagnostic ID using the URL link provided on the warning.

  • Warnings or errors for these obsoletions can't be suppressed using the standard diagnostic ID for obsolete types or members; use the custom SYSLIBxxxx diagnostic ID value instead.

Affected APIs

SYSLIB0009

  • xref:System.Net.AuthenticationManager?displayProperty=fullName

SYSLIB0054

  • xref:System.Threading.Thread.VolatileRead%2A?displayProperty=fullName
  • xref:System.Threading.Thread.VolatileWrite%2A?displayProperty=fullName

SYSLIB0055

  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int64},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int16},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.Arm64.ShiftRightLogicalRoundedNarrowingSaturateScalar(System.Runtime.Intrinsics.Vector64{System.Int32},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateLower(System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.SByte},System.Runtime.Intrinsics.Vector128{System.Int16},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int16},System.Runtime.Intrinsics.Vector128{System.Int32},System.Byte)?displayProperty=fullName
  • xref:System.Runtime.Intrinsics.Arm.AdvSimd.ShiftRightLogicalRoundedNarrowingSaturateUpper(System.Runtime.Intrinsics.Vector64{System.Int32},System.Runtime.Intrinsics.Vector128{System.Int64},System.Byte)?displayProperty=fullName

See also