Ganesh
Ganesh

Reputation: 123

How to fix sonarqube error "The Code Coverage report doesn't contain any coverage data for the included files"

I have Azure Devops Build pipeline for Xmarin project - which is .NET core project. I have unit test cases defined in that which get executed successfully.

Steps:

Now - Run sonar Analysis - give error as The Code Coverage report doesn't contain any coverage data for the included files.

But the Azure DevOps displays the Code Coverage tab and display the coverage percentage as well.

steps:
task: SonarQubePrepare@4
  displayName: 'Prepare analysis on SonarQube'
  inputs:
    SonarQube: SonarAPI
    projectKey: XXX
    projectName: XXX
    extraProperties: '/d:sonar.cs.vscoveragexml.reportsPaths="**/*.coveragexml"'`

Upvotes: 2

Views: 1687

Answers (1)

Ganesh
Ganesh

Reputation: 123

It solved for me when I add in .csproject file.

Add following code snippet in existing <PropertyGroup> section.

<DebugType>Full</DebugType>

Upvotes: 3

Related Questions