Exclude files from styleCop analysis does not work

Aug 26, 2013 at 12:16 PM
I set in the project (VS2010) file the
<Compile Include="Directory\File.cs">

            <ExcludeFromStyleCop>true</ExcludeFromStyleCop>

</Compile>


To tell the tool to exclude the file from the analysis, but still in the output there are messages for errors/warnings in this file …



What is wrong with this approach?
Developer
Aug 26, 2013 at 10:09 PM
Works ok for me. What version StyleCop are you using? (It was broken in an earlier version)
Sep 9, 2013 at 3:30 PM
On the local machine StyleCop 4.3.3.0 is installed.
But the project should use a local dll 4.7.17.0 as far as I know (How Do I see which is really used?)

I also tried:
    <Compile Include="Directory\File.cs">
      <ExcludeFromStyleCop>true</ExcludeFromStyleCop>
      <ExcludeFromSourceAnalysis>true</ExcludeFromSourceAnalysis>
    </Compile>
And also:
  <SourceFileList>
    <SourceFile>Class3.cs</SourceFile>
    <SourceFile>Class4.cs</SourceFile>
    <Settings>
    <GlobalSettings>
      <BooleanProperty Name="RulesEnabledByDefault">False</BooleanProperty>
    </GlobalSettings>
    </Settings>
  </SourceFileList>
Developer
Sep 10, 2013 at 12:44 PM
I suggest you upgrade, it was fixed in 4.7.25: https://stylecop.codeplex.com/workitem/7253
Sep 25, 2013 at 6:04 PM
I've updated the dll to 4.7.25.

But still no change ... :(

Is there a way to see like a debugging mode where stylecop is getting the list of files to check and where it is removing the excluded.
Maybe this way I can check where the problem is.
Developer
Sep 25, 2013 at 7:36 PM
Can I ask why you didn't upgrade to the latest version (4.7.46)? This will be the best way to get support.