Using Partcover with mstest and nant

I'm trying to make Partcover work with msbuild on nant.
I followed the instructions at

I currently can see the following ouput:

##teamcity[importData id='mstest' file='.\Synchronizer_sn\T4CDeviceSynchroniser.Tests\bin\Debug\TestResults\testResults.trx']
##teamcity[dotNetCoverage partcover_report_xslts='.\Package\PartCover\ByAssembly.xslt=>byAssembly.html|n.\Package\PartCover\ByClass.xslt=>byClass.html'
##teamcity[importData type='dotNetCoverage' tool='partcover' path='.\Synchronizer_sn\T4CDeviceSynchroniser.Tests\bin\Debug\cover.xml'

All files seem to be on the correct place, and I can see they were generated by partcover while running the unit tests.
I must be missing something because the coverage reports are not showing up anywhere. Unit test results show up correctly.

Do I need to set up anything special on the build configuration? I see there is a ".NET Coverage section" on the Runner: NAnt page.


Paulo Santos

Please try using full paths to .xslt files on the service messages.

Note, if you use PartCover 2.3 you will have to patch bundled .xslt files to make them support updated partcover report .xml format.


Service messages in you code was not closed with ']'


That's exactly it!
I can't believe I lost so much time trying different things and didn't see it!
I now see the coverage reports correctly!


Please sign in to leave a comment.