Posted By

Tagged

C#: How to suppress an error than keeps the solution from building

Replace Microsoft.Performance with the type of error it is.
Replace CA1822 with the error number.
Look up what the error number is and replace MarkMemberAsStatic with its definition.
Replace the Justification string with the reason you're suppressing the error.

If your using FxCop:
Analyze your code using the FxCop utility.
In the Active window / tab, right click on the line that represents the error.
Select Copy As / SuppressMessage.
Paste above the method that's causing the error. This process will give you the same code as the steps above. It just easier.