Reputation: 11
Using: TFS 2017 Update-2 VS2015 VSTS Task 3.2.0 SonarQube 5.6.6 LTS
After the upgrade of the SonarQube Extension from 4.0.2 to 4.1 We get a warning when running the "Scanner for MSBuild - End Analysis" task.
We noticed that the codecoverage.xml files are not generated by the Code Coverage Tool (see logging below).
This only appears for TFS agents with VS2015 installed, it works fine for the same setup with VS2017.
We applied the work-around: SonarQube Code Coverage from VSTS we put /d:sonar.cs.vscoveragexml.reportsPaths=**/*.coveragexml in the additional setting of the task "Scanner for MSBuild - Begin Analysis" But stil no codecoverage.xmlfiles are produced
Is there another workaround or solution ?
2018-03-21T10:01:20.7772938Z ##[section]Starting: Complete the SonarQube analysis
2018-03-21T10:01:20.7929236Z ==============================================================================
2018-03-21T10:01:20.7929236Z Task : Scanner for MSBuild - End Analysis
2018-03-21T10:01:20.7929236Z Description : [DEPRECATED] Use new version of the task
2018-03-21T10:01:20.7929236Z Version : 3.2.0
2018-03-21T10:01:20.7929236Z Author : SonarSource
2018-03-21T10:01:20.7929236Z Help : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2018-03-21T10:01:20.7929236Z ==============================================================================
2018-03-21T10:01:20.7929236Z Preparing task execution handler.
2018-03-21T10:01:21.1835551Z Executing the powershell script: C:\TFS\Agent\_work\_tasks\SonarQubeScannerMsBuildEnd_6d01813a-9589-4b15-8491-8164aeb38055\3.2.0\SonarQubePostTest.ps1
2018-03-21T10:01:22.3867151Z WARNING: ------------------------------------------------------------------------
2018-03-21T10:01:22.3867151Z This executable is deprecated and may be removed in next major version of the SonarScanner for MSBuild. Please use 'SonarScanner.MSBuild.exe' instead.
2018-03-21T10:01:22.3867151Z ------------------------------------------------------------------------
2018-03-21T10:01:22.3867151Z SonarScanner for MSBuild 4.1
2018-03-21T10:01:22.3867151Z Using the .NET Framework version of the Scanner for MSBuild
2018-03-21T10:01:22.3867151Z Default properties file was found at C:\TFS\Agent\_work\_tasks\SonarQubeScannerMsBuildBegin_15b84ca1-b62f-4a2a-a403-89b77a063157\3.2.0\SonarQubeScannerMsBuild\SonarQube.Analysis.xml
2018-03-21T10:01:22.3867151Z Loading analysis properties from C:\TFS\Agent\_work\_tasks\SonarQubeScannerMsBuildBegin_15b84ca1-b62f-4a2a-a403-89b77a063157\3.2.0\SonarQubeScannerMsBuild\SonarQube.Analysis.xml
2018-03-21T10:01:22.3867151Z Post-processing started.
2018-03-21T10:01:22.3867151Z 11:01:21.761 11:01:21.746 WARNING: Failed to find the code coverage command line tool. Possible cause: Visual Studio is not installed, or the installed version does not support code coverage.
Upvotes: 0
Views: 472
Reputation: 1590
This issue is being tracked in #461 Failure to find VS2015 CodeCoverage.exe after searching for nonexistent registry key which lists the known workarounds (namely, manually add a registry key, or use VS2017 to build).
It should also work if the build agents have both VS2015 and VS2017 installed - the build can be performed using VS2015, but scanner end step should detect and use the VS2017 version of the code coverage tool.
Upvotes: 3