title: VS2015: warning MSB3884: Could not find rule set file
body: <p>After upgrading my WinForms VS2013 project to VS2015, I started seeing the MSB3884 "Could not find rule set file" warning.</p>
  
  <p>A Google search turned up one MSDN article, which a Stack Overflow article points to as well as numerous other sites.</p>
  
  <p>Similar Question: <a href="https://stackoverflow.com/questions/33020507/vs2015-msb3884-warning-could-not-find-rule-set-file">33020507</a>
  MSDN: <a href="https://social.msdn.microsoft.com/Forums/office/en-US/c6eea146-81f4-4d68-8886-e4433359bbdf/vs2015-msb3884-warning?forum=msbuild" rel="noreferrer">VS2015 MSB3884 Warning</a></p>
  
  <p>I have both VS2013 and VS2015 installed.</p>
  
  <p>The project files giving the warnings (and those that do not), do not have these entries.</p>
  
  <pre><code>&lt;CodeAnalysisRuleSetDirectories&gt;
  &lt;CodeAnalysisRuleDirectories&gt; 
  </code></pre>
  
  <p>If I delete the other two entries from the project file, then the problem goes away, which is obvious, as there is no rule file set.</p>
  
  <pre><code>&lt;CodeAnalysisIgnoreBuiltInRuleSets&gt; 
  &lt;CodeAnalysisIgnoreBuiltInRules&gt;
  </code></pre>
  
  <p>I am trying to build externally using msbuild, however VS2015 tends to show the problem too.</p>
  
  <p>Interestingly enough, if I click on the open button in the project properties Code Analyzer area, I do get the file.</p>
  
  <p>Specifying a different rule set makes no difference. That makes me think that possibly, there is an environment variable setting, not that any come to mind. Code Analyzers is a function of the project file. I can add a directory attribute, but the consensus is to take out paths, the <code>&lt;CodeAnalysisRule*Directories&gt;</code>.</p>
  
  <p>The GUI uses defaults:</p>
  
  <p><a href="https://i.stack.imgur.com/9cAin.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9cAin.png" alt="VS2015 Project Properties Code Analysis tab"></a>'</p>
  
  <p>Here is a typical project file fragment.</p>
  
  <pre><code>  &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"&gt;
      &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;
      &lt;OutputPath&gt;bin\x86\Debug\&lt;/OutputPath&gt;
      &lt;DefineConstants&gt;TRACE;DEBUG&lt;/DefineConstants&gt;
      &lt;DebugType&gt;full&lt;/DebugType&gt;
      &lt;PlatformTarget&gt;x86&lt;/PlatformTarget&gt;
      &lt;CodeAnalysisIgnoreBuiltInRuleSets&gt;true&lt;/CodeAnalysisIgnoreBuiltInRuleSets&gt;
      &lt;CodeAnalysisIgnoreBuiltInRules&gt;false&lt;/CodeAnalysisIgnoreBuiltInRules&gt;
      &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;
      &lt;TreatWarningsAsErrors&gt;true&lt;/TreatWarningsAsErrors&gt;
      &lt;CodeAnalysisRuleSet&gt;BasicCorrectnessRules.ruleset&lt;/CodeAnalysisRuleSet&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"&gt;
      &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;
      &lt;OutputPath&gt;bin\x64\Debug\&lt;/OutputPath&gt;
      &lt;DefineConstants&gt;TRACE;DEBUG&lt;/DefineConstants&gt;
      &lt;DebugType&gt;full&lt;/DebugType&gt;
      &lt;PlatformTarget&gt;x64&lt;/PlatformTarget&gt;
      &lt;CodeAnalysisRuleSet&gt;MinimumRecommendedRules.ruleset&lt;/CodeAnalysisRuleSet&gt;
      &lt;CodeAnalysisIgnoreBuiltInRules&gt;false&lt;/CodeAnalysisIgnoreBuiltInRules&gt;
    &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>Without getting rid of the Code Analysis lines from the project file, though saving a project file again would just add it back, how can I eliminate/fix the warning?</p>