"Suppress Warning" menuitem in Visual Studio 2010 is not available
Asked Answered
P

2

9

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.

Pizarro answered 1/9, 2010 at 10:30 Comment(4)
I have this same problem in VS2008. I used to the option in the context menu, but somehow lost it.Mafala
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. HTH.Pizarro
Since you got it working, perhaps you should close the question?Scrubland
At least provide it as an answer and mark it as the accepted answer.Scabious
P
1

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.

Pizarro answered 15/11, 2010 at 7:40 Comment(0)
L
0

I had the same problem. To me it seem to be a little confusing that the "Error list" contains both "Run Code Analysis"-messages and "build projet/solution"-messages. The menu can only appear if the code analysis is run explicitly. The messages in the list are also a little bit different depending there origination. If the "suppress" option should appear in the context menu, the message must start with "CAxxxx ..."

Leveloff answered 6/12, 2011 at 9:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.