This project has moved. For the latest updates, please go here.


Issues with merging multiple coveragexml files


I am using ReportGenerator tool (version to merge multiple .coveragexml files generated by Visual Studio. I am seeing various issues in the resulted generated by ReportGenerator.
  1. When I generate report for single coveragexml file, the number of lines for an assemby shown in the report are less as compared to number of lines shown by visual studio for same file.
  2. When I merge 2 coverage xml files, number of lines for an assemby (covered lines, uncovered lines as well as coverable lines) are again less when compared with the merged coveragexml files in visual studo.
E.g. a binary called bedsmbox.dll has following information when seen in the merged coveragexml file.

Covered lines: 14188
NOt covered lines: 25565
Partially covered lines: 136

ReportGenraror Html report (generated by merging 2 coverage xml files) shows following data for the same binary:

Covered lines: 2149
Not covered lines: 22720
Coverable lines: 24869

As you can see, there is huge difference between the reults.
  1. When I merge multiple coveragexml files (I have tried this with upto 150 xml files), the number of lines keep on increasing for a binary.
For the same binary, the merged html shows (as generated by merging around 140 coverage xml files) shows following data:

Covered lines: 47132
Not covered lines: 214957
Coverable lines: 262089

Closed Mar 5, 2015 at 6:52 PM by danielpalme
No feedback was provided.

If you are able to reproduce this, please create a new issue here:


danielpalme wrote Jun 24, 2014 at 6:28 AM

Hi Nilesh,

your question is not easy to answer without the coverage file(s).
But I guess that the problem is caused by merging the coverage files.

ReportGenerator supports merging several coverage files. You don't have to do this yourself.
Just pass several files separated by ';' to ReportGenerator (e.g. -reports:file1.coveragexml;file2.coveragexml).

How did you merge the results for Visual Studio? Did you just concatenate them?
I'm not sure if VS can handle merged files correctly.

Can you create a minimum sample where ReportGenerator and VisualStudio show (significantly) different coverage?
That would be great to see if there is a real issue.

Best regards


dhakras_n wrote Jun 26, 2014 at 9:52 AM

Hi Daniel,

I am using report generator to merge several coverage reports just as you have mentioned. With Visual Studio, I have never been able to merge more than 3 reports because it fails with out of memory exception. My coveragexml reports are from 1-2 GB in size.

I was observing that for some specific reports, when they are added in the merge process for ReportGenerator, the number of lines (all of them: covered, coverable etc) were increasing with a factor of 10x. This was happening for some coveragexml files. For other coveragexml files, I was able to merge as many as 130 coverafexml reports and the report showed expected number of lines for all modules.

It turns out that, the problem was in coveragexml files. Only for few coveragexml files, I am actually seeing multiple 'CoverageDSPriv' nodes in the xml. The first CoverageDSPriv section has all the modules, while the rest of CoverageDSPriv modes have around 1-2 modules - which are also present in the first CoverageDSPriv section. This causes the 'merge' being invoked even when 1 coveragexml file is getting convered to HtmlSummary report.

I checked that most of the coveragexml files have only 1 CoverageDSPriv node, which has Module and File as subnodes. I am not sure why only some coveragexml files have this problem. I am investigating if there some difference in the process with with the original coverage file was generated.

I ensured that when there are more than 1 CoverageDSPriv nodes, the repeating modules have same number of lines and coverage. Thus it is a duplication. This duplication causes same module to be counted multiple times, and thus increases the lines.

I will let you know details about further investigation.


wrote Aug 19, 2014 at 2:26 PM

jblunck wrote Jan 28, 2015 at 9:45 PM

I'm seeing the same symptoms, i.e. the result of merging several .coveragexml files appears to be incorrect. Did you manage to investigate this more?


danielpalme wrote Jan 29, 2015 at 7:33 AM

Can you provide me a minimum sample that shows the problem?
Can you explain concretely what's wrong?

Without any concrete information I can't investigate!

danielpalme wrote Jan 29, 2015 at 7:35 AM

I'm closing this issue since no further feedback was provided.

** Closed by danielpalme 19.08.2014 07:26

wrote Jan 29, 2015 at 7:35 AM

wrote Jan 29, 2015 at 7:35 AM

wrote Mar 5, 2015 at 6:52 PM