Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Suppress Warning" menuitem in Visual Studio 2010 is not available

I'm using Visual Studio 2010 Ultimate, and it seems that I cannot suppress warnings in the way I used in VS2008.

My project is in C#, and when I right click a warning in the "Error List" window (e.g. for a missing XML-comment of a public type), I do not have the usual menu item to suppress this warning (neither in code nor in the global suppressions file).

The project's properties for Code Analysis are

Enable Code Analysis on Build (defines CODE_ANALYSIS constant) => not checked Suppress results from generated code => checked

In the solution's properties for Code Analysis I set all configurations and all platforms to use the "Microsoft All Rules" rule set.

Any ideas why I don't get the menu item anymore? Any help is greatly appreciated,

thanks in advance &

Best regards,

G.

like image 681
Gorgsenegger Avatar asked Sep 01 '10 10:09

Gorgsenegger


1 Answers

I've been trying to get this thing fixed, and somehow it seems to be working again. The problem is that I cannot exactly reproduce what the solution was, but anyway, here is what I tried: - Tools > Customize > Commands > Context menu > Click "Reset All" - Check that under Context menu > "Other Context Menus | Error List" the expected entry for "Suppress message(s)" exists, otherwise add it.

What you also have to keep in mind is that you can only suppress messages generated by FxCop, so a mismatching parameter in source and XML comment cannot be suppressed.

like image 169
Gorgsenegger Avatar answered Nov 08 '22 01:11

Gorgsenegger