Reputation: 123
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.
Tried to add runConfigSetting file in the project which defines the code Coverage tool settings.
Added extra properties in Sonar Init step
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
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