I had this problem and I solved it with these steps, take into account that I'm using msbuild, so this will only work if you're using msbuild:
- Add a Target for Coverage
- Add a task to your build.proj for creating the OpenCoverage output (OpenCoverReport.xml)
- Right after after that, add a task for creating the Summary report using
ReportGenerator (reporttypes:XML). Like so: MSBuild Coverage Target Example
- Create the XSL Transforms for creating HTML output with the Summary.xml, don't worry I wrote it already: For parsing assembly level coverage (in your build log output) use the following: XSLT for an Assembly level coverage report and for parsing the Class level coverage (detailed report) use the following: XSLT for a Class level coverage report
- Add the buildReportBuildPlugin and xslReportBuildPlugin for creating both reports using the previous XSLT files in your dashboard.config file: Add this to the configuration
- Merge the coverage report summary XML file to the Build output, in your ccnet.config file: add this to your configuration