StyleCop rule violations are ignored on subsequent builds (VS2012)

Sep 3, 2013 at 12: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 4:51 AM

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

Sep 12, 2013 at 7: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