Unable to see code code coverage while using sonar from jenkins pipeline

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

We are using Sonar 8.1 (community edition)

  • what are you trying to achieve
    We are having a .Net Project which we are doing a build and running test by jenkins pipeline job where we have integrated the sonar.
  • what have you tried so far to achieve this
    We have first build the project, executed the unit test and generated the .trx files and .coverage files, after that we are doing a sonar analysis with begin, build, test and end.
    but code coverage is showing 1.7%
    We are stuck on this for past 1 month without much progress.

I have used the link mentioned in sonarqube analysis for dot net code. But I am getting the below error.

WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeeded?

ERROR: script returned exit code -1

hi @soumya1 and apologies for the delay.

Did you read the Code Coverage is not shown in the SonarCloud.io topic? Could you follow the advice given there to diagnose your problem?