# Could not find any coverage report file matching the pattern

**URL:** <https://community.sonarsource.com/t/could-not-find-any-coverage-report-file-matching-the-pattern/46150>\
**Category:** SonarQube Cloud\
**Tags:** azuredevops-services, sonarqube-cloud\
**Created:** [July 8, 2021, 1:22pm UTC](https://community.sonarsource.com/t/could-not-find-any-coverage-report-file-matching-the-pattern/46150 "2021-07-08T13:22:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [July 14, 2021, 3:43pm UTC](https://community.sonarsource.com/t/could-not-find-any-coverage-report-file-matching-the-pattern/46150/5 "2021-07-14T15:43:45Z")

</div>

Hi @Jeremie ,

From the pertinent logs:

```plaintext
2021-07-08T10:47:05.6819194Z 10:47:05.671 INFO: Sensor C# Tests Coverage Report Import [csharp]
2021-07-08T10:47:05.6820350Z 10:47:05.680 DEBUG: Analyzing coverage with wildcardPatternFileProvider with base dir 'D:\a\1\.' and file separator '\'.
2021-07-08T10:47:05.6830792Z 10:47:05.682 DEBUG: Pattern matcher extracted prefix/absolute path 'D:\a\_temp' from the given pattern 'D:\a\_temp\**\*.coveragexml'.
2021-07-08T10:47:05.6841138Z 10:47:05.682 DEBUG: Gathering files for wildcardPattern '**\*.coveragexml'.
2021-07-08T10:47:06.0600925Z 10:47:06.058 DEBUG: Pattern matcher returns '0' files.
2021-07-08T10:47:06.0607718Z 10:47:06.059 WARN: Could not find any coverage report file matching the pattern 'D:\a\_temp\**\*.coveragexml'. Troubleshooting guide: https://community.sonarsource.com/t/37151
2021-07-08T10:47:06.0612240Z 10:47:06.059 DEBUG: Analyzing coverage after aggregate found '0' coverage files.
2021-07-08T10:47:06.0614019Z 10:47:06.059 DEBUG: The total number of file count statistics is '0'.
2021-07-08T10:47:06.0615836Z 10:47:06.059 INFO: Sensor C# Tests Coverage Report Import [csharp] (done) | time=388ms
2021-07-08T10:47:06.0617161Z 10:47:06.060 INFO: Sensor C# Unit Test Results Import [csharp]
2021-07-08T10:47:06.0660159Z 10:47:06.062 DEBUG: Pattern matcher extracted prefix/absolute path 'D:\a\_temp' from the given pattern 'D:\a\_temp\**\*.trx'.
2021-07-08T10:47:06.0688246Z 10:47:06.062 DEBUG: Gathering files for wildcardPattern '**\*.trx'.
2021-07-08T10:47:06.2896697Z 10:47:06.288 DEBUG: Pattern matcher returns '0' files.
2021-07-08T10:47:06.2916333Z 10:47:06.290 INFO: Sensor C# Unit Test Results Import [csharp] (done) | time=230ms

```

I believe your analysis parameters for the reportPaths is looking for \*.trx and \*.coveragexml files within the $(Agent.TempDirectory) as shown here:

```plaintext
sonar.cs.vstest.reportsPaths=D:\a\_temp\**\*.trx
sonar.cs.vscoveragexml.reportsPaths=D:\a\_temp\**\*.coveragexml

```

But in Task “9 Run unit tests and Publish report on pipeline”, the \*.trx file is in a different directory:

```plaintext
2021-07-08T10:43:16.9579233Z Results File: D:\a\1\s\TestResults\VssAdministrator_WIN-OPGFMDA7R6A_2021-07-08_10_43_15.trx

```

In Task “11 Run code coverage”, you generated a coverage.cobertura.xml file, which is not an accepted format for SonarCloud and C# coverage:

```plaintext
2021-07-08T10:45:04.7381845Z Generating report 'D:\a\_temp\TestResults\coverage.cobertura.xml'

```

So in summary:

- Please double-check the directory of the \*.trx file, it’s `$(Agent.TempDirectory)\**\*.trx` is not the right report path.
- Please double-check the file type and the coverage task. From [Task Coverage and Execution](https://sonarcloud.io/documentation/enriching/coverage/), we only accept these formats:

> **C#**
> 
> #### sonar.cs.vscoveragexml.reportsPaths
> 
> Path to the Visual Studio Code Coverage report. Multiple paths may be comma-delimited or included via wildcards. See _Notes on importing .NET reports_ below.
> 
> #### sonar.cs.dotcover.reportsPaths
> 
> Path to dotCover coverage report. See _Notes on importing .NET reports_ below.
> 
> #### sonar.cs.opencover.reportsPaths
> 
> Path to OpenCover coverage report. See _Notes on importing .NET reports_ below.

- This post might help if you are wanting to use coverage.cobertura.xml, which uses **sonar.coverageReportPaths** with the generic test data format
  - [Where is the documentation to setup Code Coverage with Azure Devops (.net)](https://community.sonarsource.com/t/where-is-the-documentation-to-setup-code-coverage-with-azure-devops-net/45843)
  - [Code Coverage from VSTS in SonarCloud Dashboard (coverlet) - #6 by emre](https://community.sonarsource.com/t/code-coverage-from-vsts-in-sonarcloud-dashboard-coverlet/1087/6)

Further references:

- [Code Coverage from VSTS in SonarCloud Dashboard (coverlet) - #6 by emre](https://community.sonarsource.com/t/code-coverage-from-vsts-in-sonarcloud-dashboard-coverlet/1087/6)
- [[Coverage] Troubleshooting guide for .NET code coverage import](https://community.sonarsource.com/t/coverage-troubleshooting-guide-for-net-code-coverage-import/37151)
- [[Coverage & Test Data] Generate Reports for C#, VB.net](https://community.sonarsource.com/t/coverage-test-data-generate-reports-for-c-vb-net/9871)

Regards,  
Joe

---

_[View the full topic](https://community.sonarsource.com/t/could-not-find-any-coverage-report-file-matching-the-pattern/46150)._
