Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress "CAxxxx" warnings in VS2015 not working?

I'm using Visual Studio 2015 and working in C#. I want to suppress compilation warnings for the warning type CA1303, so I've set this in project Properties -> Build -> Suppress Warnings:

enter image description here

However, after cleaning the project and building again, I can still see the warnings of this type in the Error List. Do I need to do anything else to suppress warnings of a particular type?

like image 933
Pedro Gordo Avatar asked May 26 '16 11:05

Pedro Gordo


1 Answers

The "CA" prefix indicates that this is a code analysis warning, not a compiler warning (which, for C#, have a "CS" prefix). So you are looking in the wrong place :)

  1. Right click your project and choose properties.
  2. On the left, click top open the "Code Analysis" tab
  3. Click the "Open" button

On the top right of the ruleset window search for CA1303 and you can toggle it on and off there.

like image 191
Murray Foxcroft Avatar answered Sep 24 '22 18:09

Murray Foxcroft