c# - Get warning number in MSBuild -


i'm implementing stylecop in .net project started 2 years ago , had no code conventions, no static analysis.

after configuring rules want use in stylecop , ran got several thousands of warnings (i omit actual number because overflow stackoverflow site :)).

the point is: since cannot fix warnings in moment, want setup kind of "thresold" avoid more violations, , want implement post action build in msbuild.

now, question is: possible number of warnings in msbuild , generate error task if number bigger limit?

the mechanism must available both in msbuild , visualstudio, since ide common tool developers use in daily work (that's why don't want write script takes msbuild output, parse , raise error if warning limit reached).

am solving wrong problem or facing problem wrongly in opinion? have ever faced situation this?


Comments