Import of Fxcop file via service message fails

I want to import a result file from fxcopcmd into teamcity.
I have a command line buildstep to do this.

IF EXISTS %teamcity.build.workingDir%\_FxcopTest\FxCopReport.xml
   echo ##teamcity[importData type='FxCop' path='%teamcity.build.workingDir%\_FxcopTest\FxCopReport.xml']



In the build log i get this error message
C:\BA\work\11463666ad22b48c\_FxcopTest\FxCopReport.xml was unexpected at this time.

What is wrong? Why isn't the file imported successfully?

The file exists in the path, and have the following content

<?xml version="1.0" encoding="utf-8"?>
<FxCopReport Version="10.0">
<Localized>
  <String Key="Category">Category</String>
  <String Key="Certainty">Certainty</String>
  <String Key="CollapseAll">Collapse All</String>
  <String Key="CheckId">Check Id</String>
  <String Key="Error">Error</String>
  <String Key="Errors">error(s)</String>
  <String Key="ExpandAll">Expand All</String>
  <String Key="Help">Help</String>
  <String Key="Line">Line</String>
  <String Key="Messages">message(s)</String>
  <String Key="LocationNotStoredInPdb">[Location not stored in Pdb]</String>
  <String Key="Project">Project</String>
  <String Key="Resolution">Resolution</String>
  <String Key="Rule">Rule</String>
  <String Key="RuleFile">Rule File</String>
  <String Key="RuleDescription">Rule Description</String>
  <String Key="Source">Source</String>
  <String Key="Status">Status</String>
  <String Key="Target">Target</String>
  <String Key="Warning">Warning</String>
  <String Key="Warnings">warning(s)</String>
  <String Key="ReportTitle">Code Analysis Report</String>
</Localized>
<Exceptions>
  <Exception Keyword="CA0068" Kind="Engine" TreatAsWarning="True">
   <Type>Microsoft.FxCop.Sdk.FxCopException</Type>
   <ExceptionMessage>Debug information could not be found for target assembly 'TestAssembly.exe'. For best analysis results, include the .pdb file with debug information for 'TestAssembly.exe' in the same directory as the target assembly.</ExceptionMessage>
  </Exception>
</Exceptions>
</FxCopReport>

Please sign in to leave a comment.