Per https://github.com/dotnet/designs/blob/master/accepted/2020/better-obsoletion/better-obsoletion.md, we now have a strategy in place for marking existing APIs as [Obsolete]
. This takes advantage of the new diagnostic id and URL template mechanisms introduced to ObsoleteAttribute
in .NET 5.
When obsoleting an API, use the diagnostic ID SYSLIB####
, where #### is the next four-digit identifier in the sequence, and add it to the list below. This helps us maintain a centralized location of all APIs that were obsoleted using this mechanism.
The URL template we use for obsoletions is https://aka.ms/dotnet-warnings/{0}
.
Currently the identifiers SYSLIB0001
through SYSLIB0999
are carved out for obsoletions. If we wish to introduce analyzer warnings not related to obsoletion in the future, we should begin at a different range, such as SYSLIB2000
.
Diagnostic ID | Description |
---|---|
SYSLIB0001 |
The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead. |
SYSLIB0002 |
PrincipalPermissionAttribute is not honored by the runtime and must not be used. |
SYSLIB0003 |
Code Access Security is not supported or honored by the runtime. |
SYSLIB0004 |
The Constrained Execution Region (CER) feature is not supported. |
SYSLIB0005 |
The Global Assembly Cache is not supported. |
SYSLIB0006 |
Thread.Abort is not supported and throws PlatformNotSupportedException. |
SYSLIB0007 |
The default implementation of this cryptography algorithm is not supported. |
SYSLIB0008 |
The CreatePdbGenerator API is not supported and throws PlatformNotSupportedException. |
SYSLIB0009 |
The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException. |
SYSLIB0010 |
This Remoting API is not supported and throws PlatformNotSupportedException. |
SYSLIB0011 |
BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for recommended alternatives. |
SYSLIB0012 |
Assembly.CodeBase and Assembly.EscapedCodeBase are only included for .NET Framework compatibility. Use Assembly.Location instead. |