The issue is similar to "False positive IDE0079" #51884
Version Used:
Microsoft Visual Studio Professional 2022
Version 17.14.33 (May 2026)
VisualStudio.17.Release/17.14.33+37314.3.-may.2026-
Microsoft .NET Framework
Version 4.8.09221
Steps to Reproduce:
using System;
namespace Test;
internal interface ITest
{
string Name { get; }
}
internal class CTest : ITest
{
public string Name { get; }
public CTest (string name) { Name = name; }
}
internal sealed class Program
{
private static void Main (string[] args)
{
var oTest = new CTest ("ABC");
ITest iTest = oTest;
Console.WriteLine (iTest.Name);
}
}
But after adding a suppression attribute:
internal sealed class Program
{
[System.Diagnostics.CodeAnalysis.SuppressMessage ("Performance", "CA1859:Use concrete types when possible for improved performance", Justification = "<Pending>")]
private static void Main (string[] args)
{
var oTest = new CTest ("ABC");
ITest iTest = oTest;
Console.WriteLine (iTest.Name);
}
}
the analyzer complains about an unneeded attribute:
Diagnostic Id:
Warning (active) CA1859 Using concrete types avoids virtual or interface call overhead and enables inlining.
Message (active) IDE0079 Remove unnecessary suppression
Expected Behavior:
The analyzer should not report IDE0079.
Actual Behavior:
The analyzer falsely reports IDE0079.
The issue is similar to "False positive IDE0079" #51884
Version Used:
Microsoft Visual Studio Professional 2022
Version 17.14.33 (May 2026)
VisualStudio.17.Release/17.14.33+37314.3.-may.2026-
Microsoft .NET Framework
Version 4.8.09221
Steps to Reproduce:
But after adding a suppression attribute:
the analyzer complains about an unneeded attribute:
Diagnostic Id:
Warning (active) CA1859 Using concrete types avoids virtual or interface call overhead and enables inlining.
Message (active) IDE0079 Remove unnecessary suppression
Expected Behavior:
The analyzer should not report IDE0079.
Actual Behavior:
The analyzer falsely reports IDE0079.