Sonarqube Azure Devops分析后未扫描代码

问题描述

我正在将Sonarqube用于Azure DevOps管道。这些是我管道中的任务

enter image description here

在sonarqube项目上,没有为解决方案WebService扫描任何代码。我正在使用MSBuild来构建代码

enter image description here

我得到的一个警告是这个。虽然我已经在构建机器上安装了Visual Studio 2019。

SonarScanner for MSBuild 4.10 Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file: E:\Build Agents\AquilaPool2-Agent-2\_work\15\s\Src\Services\DataIngestion\St\WebService\XWS.WebAPI\bin\WebService.dll.RoslynCA_fixed.json 2020-09-23T08:45:11.5066077Z Fixed invalid Code Analysis ErrorLog file. Please check that VS 2015 Update 1 (or later) is installed. Fixed file

解决方法

我通过在SonarQube上的“准备分析”步骤中添加sonar.scm.exclusions.disabled=true解决了该问题。尽管此Roslyn错误仍然存​​在。现在正在扫描所有文件。