Random behavior for <StyleCopTreatErrorsAsWarnings>

Jun 4, 2013 at 7:43 AM
Hi,

I've checked all over the net for a solution, I followed all the steps described in the documentation but can't get StyleCopTreatErrorsAsWarnings to work, that is, throw errors instead of warnings.

I have a team project where I added the Stylecop files in the solution so it works even if you don't have it installed: http://screencast.com/t/5D6Bf27WDq2J

Then in the solution projects, I import the targets file: http://screencast.com/t/90X6YUZsM

Most of the time, the setting is just ignored - note that I also tried setting it in individual projects (as described in the docs) instead of the .targets file - just figured it's more efficient to do it at root level.

Most of the time means, if I switch the order of the <Import> tags for example it'll throw errors on rebuild but just once, the 2nd time it returns to ignoring it, sort of like a broken caching mechanism.

Note the paths are NOT ignored (stylecop.dll or the path to .targets file), I changed the paths to bogus ones just to check and it gives me a compiler error that it cannot find the referenced file.

Same thing happens on the build server and every other dev's machine, so it's definitely a configuration issue, just can't tell where.

I'm running VS 2012 Ultimate Update 2 + Resharper 7.1.3 in case it helps.