'VS2022 showing unused suppression, but failing on build
I'm running visual studio, I taken latest code repository.
One method has System.Diagnostics.CodeAnalysis.SuppressMessage attribute on it, on hover its showing unused suppression.
But while I build the project it throws error.
While building it getting this error(Method has ToLower() without and any culture).
I don't want any code change, because it's running code and someone already has added suppression over it. Is my VS creating this issue, any help to fix it. Thanks in advance.
Solution 1:[1]
Read the suppressed numbers, they're CA2000, CA1304 and CA2202. Your warning (that you chose to treat as an error) is CA1305, which is not part of the suppressed list.
I don't want any code change, because it's running code and someone already has added suppression over it
Someone has added the wrong suppression numbers, probably copy & pasted. That's not quite the same.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Blindy |


