Poznámka
Na prístup k tejto stránke sa vyžaduje oprávnenie. Môžete sa skúsiť prihlásiť alebo zmeniť adresáre.
Na prístup k tejto stránke sa vyžaduje oprávnenie. Môžete skúsiť zmeniť adresáre.
Some APIs have been marked as obsolete, starting in .NET 11.
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 11 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 |
|---|---|---|
| SYSLIB0064 | RSACryptoServiceProvider.Encrypt(Byte[], Boolean) and RSACryptoServiceProvider.Decrypt(Byte[], Boolean) are obsolete. Use the overloads that accept an RSAEncryptionPadding instead. | Warning |
Version introduced
.NET 11
Type of breaking change
These obsoletions can affect source compatibility.
Recommended action
Follow the specific guidance provided for 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
SYSLIBxxxxdiagnostic ID value instead.
Affected APIs
SYSLIB0064
- System.Security.Cryptography.RSACryptoServiceProvider.Encrypt(Byte[], Boolean)
- System.Security.Cryptography.RSACryptoServiceProvider.Decrypt(Byte[], Boolean)