I work on the same issue actually.
While VSTS supports Cobertura format, SonarQube doesn’t support it.
SonarQube supports Opencover, VSTS does not.
I think you use coverlet to get coverage report. As a workaround, I use multiple output format generation property of coverlet. VSTS parses cobertura xml and shows coverage report on build summary, SonarQube parses opencover xml.
You may try this way…
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutputFormat=cobertura
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=\"opencover,cobertura\"
I have tried it in both ways, but it didn’t work. I actuall used the following command to generate both formats in the dotnet test:
/p:CoverletOutputFormat=“cobertura%2copencover”