StyleCop rule violations are ignored on subsequent builds (VS2012)

Sep 3, 2013 at 1:42 PM
Dear All,

We use VS2012 and StyleCop 4.7 together and have the following problem:
  • we use the setting <StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings> to break the build on StyleCop violations.
  • the first time we build with stylecop rule violations in the code, the compilation fails -> OK
  • every subsequent build succeeds as the code is not compiled anymore because binaries are already in the output folder. -> Not OK
Building via MSBuild works correctly and is reporting violations consequently. But we want to have it working also in the development environment (VS2012).

Is there any way to come over this problem?

Thanks in advance
Sep 12, 2013 at 5:51 AM
Hello

I have the same problem with the same environment.
Were you able to fix the problem since

Thanks
Sep 12, 2013 at 8:38 AM
Unfortunately not - at the moment we have to do a 'rebuild' if we want to be on the safe side and not miss some StyleCop errors