SonarScanner for MSBuild 5.11
.NET 4.7.2
What can be done with this pipeline to fix it? There are a few samples of the pipeline for this case, and I’d like load code coverage to the sonar cloud:
- task: VSTest@2
displayName: 'VSTest + Coverage Biz'
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
!**\obj\**
searchFolder: '$(System.DefaultWorkingDirectory)'
diagnosticsEnabled: true
codeCoverageEnabled: true
failTaskOnFailedTests: true
publishRunAttachments: true
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
otherConsoleOptions: '/collect:"Code Coverage;Format=Cobertura"'
resultsFolder: '$(System.DefaultWorkingDirectory)\TestResults'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage results'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(build.DefaultWorkingDirectory)\TestResults\**\*.cobertura.xml'
- task: SonarCloudAnalyze@1
displayName: 'Run SonarCloud analysis'
This error is at SonarCloudAnalyze@1: ##[error]Check that the downloaded code coverage file
Coverage report conversion completed successfully.
##[error]Failed to convert the downloaded code coverage tool to XML. As a result, no code coverage information will be uploaded to SonarQube.
Failed to convert the downloaded code coverage tool to XML. No code coverage information will be uploaded to SonarQube.
##[error]Check that the downloaded code coverage file (**\TestResults\****.cobertura.xml) is valid by opening it in Visual Studio. If it is not, check that the internet security settings on the build machine allow files to be downloaded from the Team Foundation Server machine.
Check that the downloaded code coverage file (**\TestResults\***.cobertura.xml) is valid by opening it in Visual Studio. If it is not, check that the internet security settings on the build machine allow files to be downloaded from the Team Foundation Server machine.
Thanks in advance.