Parsing code as warning locally, but error while creating TFS

I would like the code parsing violations to appear locally as warnings (so that developers can run F5 even if there are CA violations), but as errors in the TFS build (more specifically, I would like the build to fail).

I still want to maintain a list of rules that I care about in one place, so I don't want to create separate rules files for local / TFS.

Any ideas on how I can set this up?

+3


source to share


1 answer


Add the msbuild parameter to your build definition. I think its / p: CodeAnalysisTreatWarningsAsErrors = true



+7


source







All Articles