I’ve just had the same problem after upgrading from VS2013 to VS2015.
My solution was:
- On the project properties go to the Code Analysis section.
- Select the Browse option on the list of rule sets.
- Browse to the VS2015 rule sets folder. C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\Rule Sets
- Pick a rule set. The default used by new projects is: MinimumRecommendedRules.ruleset
- Rebuild. Check the warning has gone.