错误S3925:更新"ISerializable"的此实现以符合推荐的序列化模式

Arn*_*ier 7 c# sonarlint visual-studio-2017

我有以下用编写的代码.

自从我将NuGet SonarAnalyzer.CSharp软件包升级到版本6.0.0.2033后,我遇到了这个错误:

错误S3925更新"ISerializable"的此实现以符合推荐的序列化模式.

public class GenericException : Exception
{
    public GenericException(string message) : base(message)
    {
        // ...
    }

    public GenericException(string message, Exception innerException) : base(message, innerException)
    {
        // ...
    }
}
Run Code Online (Sandbox Code Playgroud)

有人有想法吗?