Friday, April 13, 2012

TFS build + Code analysis : no result files in Binaries?

Interesting.
I configured to run Code Analysis during build, and for one solution all of CodeAnalysisLog files were successfully collected at Binaries directory. But for another .... they were not there.

So at first - checked that code analysis was performed - yes log says so. I went to Source directory at build agent - and here they were all together, my result files. But I still wanted them in Binaries folder, which actually is a normal default place for them to be.

So I compared .proj files from the first solution and the second - and there it was:

<CodeAnalysisLogFile>..\Bin\MyAssembly.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>

Removing that line allowed MSBuild to put files where it wanted - in Binaries folder.

1 comment: