TIP: Automatically generate Managed Code Analysis/FxCop suppressions
I see a lot of users attempting to hand code a SuppressMessageAttribute themselves. This can be error prone and is not needed when both Visual Studio and the standalone FxCop can automatically generate these for you.
In Visual Studio 2005
- Right-click a Code Analysis warning in the Error List and choose Suppress Message(s).
In Visual Studio Orcas
- Right-click a Code Analysis warning in the Error List and choose Suppress Message(s) -> In Source or Suppress Message(s) -> In Project Suppression File
In FxCop
- Right-click a warning and choose Copy As -> SuppressMessage.
- Paste the contents of the Clipboard at the top of the code element that caused the warning.
Note: In both Visual Studio and FxCop you can select multiple warnings and suppress them all once.
Comments
- Anonymous
January 22, 2007
Clara Oscura on TF26204: The account you entered is not recognized. Brian Harry on A VS SP1 Bug Fix...