I'm having the same error, and it's quite strange. I can't seem to figure out the cause.
We have the latest stylecop installed on our development machines. Analysis runs fine if launched by the IDE integration.
Then we installed the nuget package StyleCop.MsBuild in our solution projects and when building we get that error:
"The "ViolationCount" parameter is not supported by the "StyleCopTask" task. Verify the parameter exists on the task, and it is a gettable public instance property."
I tried to do the same steps on a machine without Stylecop installed and it works fine.
What steps can I try to solve this problem?