नोट
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप साइन इन करने या निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
इस पृष्ठ तक पहुंच के लिए प्राधिकरण की आवश्यकता होती है। आप निर्देशिकाएँ बदलने का प्रयास कर सकते हैं।
The HMACSHA1(Byte[], Boolean) constructor is marked as obsolete, starting in .NET 6. Using this API in code generates warning SYSLIB0030 at compile time.
Workarounds
Use a constructor without the useManagedSha1 parameter.
Suppress a warning
If you must use the obsolete APIs, you can suppress the warning in code or in your project file.
To suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the warning.
// Disable the warning.
#pragma warning disable SYSLIB0030
// Code that uses obsolete API.
// ...
// Re-enable the warning.
#pragma warning restore SYSLIB0030
To suppress all the SYSLIB0030 warnings in your project, add a <NoWarn> property to your project file.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
...
<NoWarn>$(NoWarn);SYSLIB0030</NoWarn>
</PropertyGroup>
</Project>
For more information, see Suppress warnings.