SonarCloud code coverage for .net core projects

sonarcloud
dotnet
(Shravanipandarmish Gep) #1

Can anyone help me with code coverage for .net core projects.

(Fabrice Bellingard) #2

Please provide more details if you want to get help.

(Shravanipandarmish Gep) #3

Hi Fabrice Bellingard,

We are using azure DevOps for our build pipeline.Tor test cases we are using VSTest assemblies task and netcoreapp2.1 framework.
let me know if you need more information.

Thank You.

(Fabrice Bellingard) #4

Did you follow https://aka.ms/sonarcloudlab for the setup?

(Shravanipandarmish Gep) #5

My question was sonarcloud code coverage for .net core projects.
We have the setup already in our organization but we were not getting the coverage for .net core projects. As sonarcloud has recently started supporting .net core we started getting coverage but there is a lot of fluctuations in the results. Can we know why and what can be done to get a standard report like we get for .net framework projects.
Any implementation documentation for .net core projects with sonarcloud is also much appreciated. Thanks in advance.

(Fabrice Bellingard) #6

Can you please clarify what happens? Again, as long as you don’t provide more details about your current setup and configuration (and maybe also share some logs), it’s simply impossible to help you.

(Shravanipandarmish Gep) #7

Hi Fabrice,

Currently we are facing issue with one of our project which is .net core and we are not able to get coverage for it. What logs/details can I share with you for you to analyse and help us.
Our organization setup: Azure DevOps with SonarCloud.
Thanks.

(Shravanipandarmish Gep) #8

Same with us coverage file generates in vsts but coverage report does’nt show up on SonarCloud.

(Fabrice Bellingard) #9

So it looks related to VSTS-179 - for which we tried to deploy a fix 2 weeks ago but had to revert because of potential regression. Hopefully, we’ll have it finally fixed for next week.

(Shravanipandarmish Gep) #11

After which,will we be able to get coverage for .net core 2.1 on sonarcloud?