简体   繁体   中英

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 :

在此输入图像描述

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM