Hi
is there a way to let a build fail if there are fxcop or stylecop violations (so not when there is only one general warning?)
Hi Haggy,
Assuming you are using an MSBuild action, you can add the following under a PropertyGroup in your csproj file.
<
CodeAnalysisTreatWarningsAsErrors
>true
CodeAnalysisTreatWarningsAsErrors
>
<
RunCodeAnalysis
>true
RunCodeAnalysis
>
Use the following to treat general compiler warnings as errors: <
TreatWarningsAsErrors
>true
TreatWarningsAsErrors
>
See this article for further details
thx for your reply. is there also a possibility for stylecop?
Hi Haggy,
You can add this:
<
StyleCopTreatErrorsAsWarnings
>false
StyleCopTreatErrorsAsWarnings
>
Have have look at this article for further details