title: How to merge two or more dotnet test code coverage files
body: <p>I have a .Net solution with two dotnet core class libraries and its associated unit test projects in it.</p>
  
  <p>When I run <code>dotnet test **\*.Tests.csproj --collect "Code Coverage"</code> command then it generates separate .coveragexml files for each unit test project.</p>
  
  <p>My requirement is to merge all the .coveragexml files into one single file and use that to get the total coverage matrix for a whole solution.</p>
  
  <p>Is there any tool or script to achieve this?</p>
  
  <p><strong>Note:</strong> </p>
  
  <ul>
  <li>I am not using Coverlet.</li>
  <li>I am using built-in vstest.console.exe to run tests and generate .coveragexml file.</li>
  <li>I am using <a href="https://docs.microsoft.com/en-us/visualstudio/test/customizing-code-coverage-analysis?view=vs-2017" rel="noreferrer">Customize code coverage analysis</a></li>
  </ul>