title: How can you force StyleCop to ignore a file?
body: <p>I've included a 3rd party .cs file in my code. It doesn't comply with StyleCop's rules but I desperately need to be able to exclude it from StyleCop's checks but none of the methods I've found so far will work.</p>
  
  <p>Three methods are documented here: <a href="http://sethflowers.com/blog/force-stylecop-to-ignore-a-file/">http://sethflowers.com/blog/force-stylecop-to-ignore-a-file/</a> .. but none of these methods seems to work in StyleCop 4.7 </p>
  
  <p>The most useful of which looks to be this method in .csproj:</p>
  
  <pre><code>&lt;Compile Include="AViolatingFile.cs"&gt;
      &lt;ExcludeFromStyleCop&gt;true&lt;/ExcludeFromStyleCop&gt;
  &lt;/Compile&gt;
  </code></pre>
  
  <p>But despite having added the files, StyleCop still causes a compilation error when parsing this file. </p>