Support cobertura XML for C#

  • SonarQube Server 2026.1

It would be very nice if SonarQube would directly support Cobertura XML for C#. I don’t see, why that’s not the case, because Cobertura is supported for other languages.

Reasoning:

dotnet test offers three formats

  1. coverage, which is not recommended when not building on windows
  2. xml which seems not to support partial branch coverage
  3. cobertura which seems to be the best format considering coverage features and cross-platform support

So my natural choice was to use 3, but I can use that only if I add additional conversion with https://github.com/danielpalme/ReportGenerator

Hey @carlossus, Cobertura is supported for C# starting from SonarQube Server 2026.3 with the sonar.cs.cobertura.reportsPaths parameter, so you just have to update and you’ll be able to use it.

However, it seems we have a gap in the docs. The documented release notes mention this (see the “Cobertura coverage format for C#” section), and I was also able to found the Jira ticket associated with this. However, there is no mention in the .NET coverage docs. I’ll relay this to the documentation team.

Thanks for the good news. So I’ll have to wait until we upgrade.