"Inspections were not gathered" build status

The build status gets set to this when there are no FxCop issues. Seems like this is a bug. Am I missing something? My build is using FxCop directly. It creates an empty file for clean builds because I rely on it being there for other parts of the build.

<

WriteLinesToFile File="$(FxCop_OutputPath)" Lines="&lt;xml&gt;&lt;/xml&gt;" Condition="!Exists('$(FxCop_OutputPath)')" />

<

Message Text="##teamcity[importData id='FxCop' file='$(MSBuildProjectDirectory)\$(StaticAnalysis_OutputPath)\FxCop.xml']"

Condition="'$(BuildLabel)'!='0.0.0.0'" />

<

Message Text="##teamcity[progressFinish 'Running FxCop']" />

3 comments
Comment actions Permalink

Could you please attach build agent logs and the produced build log.
Thanks!

0
Comment actions Permalink

Eugene,

I spent some time over the weekend look at this. There seem to be a couple of things going on

1) The FxCop xml file needs to be in the same folder as the DLLs it refers to. Maybe this was always the case in 4.0.but it didn't add errors to the build log (example attached).

2) If any file is imported, even one that doesn't contain any analysis issues the build always seems to result in the "Inspections were not gathered" status.

I ended up "fixing" the issue by doing the following:

  <Message Text="##teamcity[importData id='FxCop' file='$(BinaryOutputRoot)\$(Platform)\$(Configuration)\FxCop.xml']"
       Condition="Exists('$(BinaryOutputRoot)\$(Platform)\$(Configuration)\FxCop.xml')" />

Hope this helps...

Ade



Attachment(s):
NBody_NBody_CI_build_Hg_33.log.zip
0
Comment actions Permalink

Hello.

1) Yes, because of relative file paths...

2) importData won't import malformed xml file (like empty one), but it will import correct file from FxCop with no inspections in it...
Do you really want to import inspections if you didn't run fxcop in the build?

0

Please sign in to leave a comment.