views:

19

answers:

1

Hello everyone !

I would like to use fxcop in a continuous build, and almost every class in my project are analysed, but there is some exception (assembly load) and it makes the fxcopcmd exit with error code 8. So the continuous build fails, because of this error code.

I want the build to finish, so that i can present all the results, even those exceptions.

So is there a way to suppress the error code ?

Thanks

A: 

You might want to search why it can't load the assembly. If you just want the build to continue, even if there are FxCop rule violations, you could set FailOnError to False. If you use MSBuild, that is. Our file has something that looks like this (never mind the variables):

<FxCop TargetAssemblies="@(BusinessAssembly)" ProjectFile="business.fxcop" AnalysisReportFileName="$(FxCopReportFile)" ToolPath="$(FxCopToolPath)" FailOnError="True" />

If you set the FailOnError to False, the build will just continue, but you'll have the business.fxcop report. But, if there are real FxCop violations, the build will continue also. Keep that in mind.

Peter
I use fxcopcmd on a project i can not modify. So if there is a problem in it, there is nothing i can do, but i can't tell the client "your code have a problem, i can't do anything with it" either. I created a proxy exe which calls the real exe and returns 0. But thanks for the tip, that could come handy.
Maxime ARNSTAMM