My C# application uses the Code Analysis rule set Microsoft Managed Recommended Rules
. I'm using some obsolete classes so I get the warning CS0618. (I cannot replace the obsolete classes because it's defined in a 3rd party API, so I have to use it)
I wanted to disable this warning by editing the default rule set and saving it under a new name, but the CS0618 rule is not part of this rule set.
So I have two questions:
For those who are curious why I cannot simply fix the compiler warning: see Refactoring XmlSchemaCollection, XmlValidatingReader and ValidationType.XDR to get rid of compiler warning
CS0168 isn't part of Code Analysis - it's a simple C# compiler warning. That's got nothing to do with any later code analysis.
To disable it in project properties, go into the project properties, the Build tab, Errors and Warnings section, Suppress Warnings, and specify 0168 (not CS0168).
See more on this question at Stackoverflow