# Sonarcloud issues for dotnet project

**URL:** <https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793>\
**Category:** SonarQube Cloud\
**Tags:** coverage\
**Created:** [October 17, 2025, 11:08am UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793 "2025-10-17T11:08:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jchada-nb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jchada-nb/32/72999_2.png) [@jchada-nb](https://community.sonarsource.com/u/jchada-nb)\
**Post date:** [October 17, 2025, 11:08am UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/1 "2025-10-17T11:08:37Z")

</div>

I have unit and integration test cases defined in multiple folders for which iam generating mutliple open cover xml files using below :  
dotnet test “$proj” \

```
              --logger trx \\

               --results-directory "$(System.DefaultWorkingDirectory)/TestResults" \\

              /p:CollectCoverage=true \\

              /p:CoverletOutputFormat=opencover \\

              /p:CoverletOutput="$(System.DefaultWorkingDirectory)/TestResults/coverage/$name.coverage.xml"

      done

```

it is generating the files in /TestResults/, when i publish them for sonar analysis using below :

```
  - task: SonarCloudPrepare@3

    displayName: 'Prepare SonarCloud Analysis'

    inputs:

      SonarCloud: ${{ parameters.sonarConnection }}

      organization: ${{ parameters.organization }}

      scannerMode: 'dotnet'

      projectKey: ${{ parameters.projectKey }}

      projectName: ${{ parameters.projectName }}

      extraProperties: |

          sonar.exclusions=\*\*/bin/\*\*,\*\*/obj/\*\*

          sonar.test.inclusions=\*\*/\*.Tests/\*.cs

          sonar.cs.opencover.reportsPaths=$(System.DefaultWorkingDirectory)/TestResults/coverage/\*\*/\*.xml

```

iam suspecting all the reports are not being recognized by sonar, not seeing coverage for all my folders in src.. please advice

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [October 20, 2025, 8:49am UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/2 "2025-10-20T08:49:32Z")

</div>

Hey there.

What do the logs say about importing code coverage?

> [@How to find logs about importing code coverage](https://community.sonarsource.com/t/how-to-find-logs-about-importing-code-coverage/73317):
>
> When coverage data isn’t appearing as expected in SonarQube Server / Community Build or SonarQube Cloud, the first place you should look is the scanner logs. Where do I find the scanner logs?warning This will likely be broken out into its own guide soon The Scanner logs are the output of executing one of the [scanners](https://docs.sonarqube.org/latest/analysis/overview/), either directly or wrapped by one of many integrations, such as the [SonarScanner for Jenkins](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-jenkins/), [SonarScanner for Azure DevOps](https://docs.sonarqube.org/latest/analysis/scan/sonarscanner-for-azure-devops/), [SonarQube](https://github.com/SonarSource/sonarqube-scan-action)/[SonarCloud](https://github.com/marketplace/actions/sonarcloud-scan) GitHub Actions or [SonarQube](https://bitbucket.org/sonarsource/sonarqube-scan/src/master/) /…

---

<div class="post-metadata">

**Author:** ![jchada-nb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jchada-nb/32/72999_2.png) [@jchada-nb](https://community.sonarsource.com/u/jchada-nb)\
**Post date:** [October 23, 2025, 9:34am UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/3 "2025-10-23T09:34:06Z")

</div>

Hey Colin, Thanks for taking a look into this. sonar analysis is running on all the generated coverage files..  
but seeing below while parsing them.. this could the reason why all the folders in src are not showing up ?

2025-10-22T06:50:22.7337449Z 06:50:22.733 DEBUG: The file ‘/home/vsts/work/1/s/src/module1/testfile1.cs’ does not have a deterministic build path and is either not indexed or does not have a supported language. Will skip this coverage entry. Verify sonar.sources in .sonarqube\out\sonar-project.properties.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [October 23, 2025, 11:16am UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/4 "2025-10-23T11:16:10Z")

</div>

Could be! There are similar reports in this community. Have a look through them and how they solved it:

> [@SonarCloudAnalyze@3 unable to parse the .NET coverage file in Azure DevOps](https://community.sonarsource.com/t/sonarcloudanalyze-3-unable-to-parse-the-net-coverage-file-in-azure-devops/134959/8):
>
> After many many tests, I finally managed to find what the issue was. I had a file named Directory.Build.props at the root of my sources, with this content : \<Project\> \<PropertyGroup\> \<PathMap\>$(MSBuildProjectDirectory)=$(MSBuildProjectName)\</PathMap\> \</PropertyGroup\> \</Project\> Deleted it and now the coverage report contains correct file paths !

---

<div class="post-metadata">

**Author:** ![jchada-nb](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jchada-nb/32/72999_2.png) [@jchada-nb](https://community.sonarsource.com/u/jchada-nb)\
**Post date:** [October 27, 2025, 11:44am UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/5 "2025-10-27T11:44:53Z")

</div>

Thanks Colin, this helped me. the issue was resolved but how can we pass cobertura.xml files to the sonarcloud for analysis? just like we did for open cover.. i want to move from opencover to cobertura for generating allure report purposes and other compatibilities

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [October 27, 2025, 1:05pm UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/6 "2025-10-27T13:05:35Z")

</div>

SonarQube doesn’t support Cobertura for coverage import on .NET. You can find the full list of supported formats (per language) [here](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/test-coverage/test-coverage-parameters).

---

<div class="post-metadata">

**Author:** ![denis.troller](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/denis.troller/32/49117_2.png) [@denis.troller](https://community.sonarsource.com/u/denis.troller)\
**Post date:** [October 27, 2025, 3:36pm UTC](https://community.sonarsource.com/t/sonarcloud-issues-for-dotnet-project/150793/7 "2025-10-27T15:36:39Z")

</div>

> [@jchada-nb](#):
>
> Thanks Colin, this helped me. the issue was resolved but how can we pass cobertura.xml files to the sonarcloud for analysis? just like we did for open cover.. i want to move from opencover to cobertura for generating allure report purposes and other compatibilities

Hi @jchada-nb,

FYI, we are considering adding Cobertura support, but we do not have a firm timeline yet. You can see the feature, vote for it and register for updates on the [public SonarQube Cloud Roadmap](https://portal.productboard.com/sonarsource/1-sonarqube-cloud/c/759-corbetura-code-coverage-format-support-for-net?&utm_medium=social&utm_source=share)!

In the meantime I have recorded your need in our internal tool.

Thank you for your input and participation in the Community!

Denis
