首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SonarQube MSBuild扫描器: end MSBuild集成失败

SonarQube MSBuild扫描器: end MSBuild集成失败
EN

Stack Overflow用户
提问于 2017-03-24 19:06:08
回答 1查看 3.4K关注 0票数 1

我在执行SonarQube扫描仪时遇到了问题。开始部分的运行似乎没有问题,也没有MSBuild命令,但是结束部分失败了。

第一步:I执行以下SonarQube扫描命令:

代码语言:javascript
复制
D:\workspace\MasterData>SonarQube.Scanner.MSBuild.exe begin /k:"masterdata" /n:"MasterData" /v:"1.0" /d:sonar.host.url=http: //xyz.com.br:9000/sonarqube /d:sonar.login=5773c2ca935fde42c72494a96de5a68a5b6899d1 /d:sonar.verbose=true

SonarQube Scanner for MSBuild 2.2
Default properties file was found at D:\sonar-scanner-msbuild-2.2.0.24\SonarQube.Analysis.xml

Loading analysis properties from D:\sonar-scanner-msbuild-2.2.0.24\SonarQube.Analysis.xml

sonar.verbose=true was specified - setting the log verbosity to 'Debug'

Pre-processing started.

Preparing working directories...

Using environment variables to determine the download directory...

Removing the existing directory: D:\workspace\MasterData\.sonarqube

Creating directory: D:\workspace\MasterData\.sonarqube

SonarQube server URL: http: //xyz.com.br:9000/sonarqube

SonarQube Scanner for MSBuild 2.2

15:11:10.032  Loading analysis properties from D:\sonar-scanner-msbuild-2.2
.0.24\SonarQube.Analysis.xml

15:11:10.04  sonar.verbose=true was specified - setting the log verbosity to 'Debug'

15:11:10.042  Updating build integration targets...

15:11:10.045  Installed SonarQube.Integration.ImportBefore.targets to C:\Users\AppData\Local\Microsoft\MSBuild\14.0\Microsoft.Common.targets\ImportBefore

15:11:10.046  Installed SonarQube.Integration.ImportBefore.targets to C:\Users\f
g009adm\AppData\Local\Microsoft\MSBuild\12.0\Microsoft.Common.targets\ImportBefore

15:11:10.048  Installed SonarQube.Integration.targets to D:\workspace\MasterData\.sonarqube\bin\targets

15:11:10.049  Creating config and output folders...

15:11:10.049  Creating directory: D:\workspace\MasterData\.sonarqube\conf

15:11:10.049  Creating directory: D:\workspace\MasterData\.sonarqube\out

15:11:10.055  Fetching analysis configuration settings...

15:11:10.062  Fetching properties for project 'masterdata' from http: //xyz.com.br:9000/sonarqube/api/properties?resource=masterdata...

15:11:10.062  Downloading from http: //xyz.com.br:9000/sonarqube/api/properties?resource=masterdata...

15:11:10.214  Downloading from http: //xyz.com.br:9000/sonarqube/api/updatecenter/installed_plugins...

15:11:10.239  Fetching quality profile for project 'masterdata' from http: //xyz.com.br:9000/sonarqube/api/qualityprofiles/search?projectKey=masterdata...

15:11:10.24  Downloading from http: //xyz.com.br:9000/sonarqube/api/qu
alityprofiles/search?projectKey=masterdata...

15:11:10.272  Downloading from http: //xyz.com.br:9000/sonarqube/api/rules/search?f=repo,name,severity,lang,internalKey,templateKey,params,actives&ps=
500&activation=true&qprofile=cs-sbs-cs-default-201410-86215&p=1...

15:11:10.451  Downloading from http: //xyz.com.br:9000/sonarqube/api/rules/search?f=internalKey&ps=500&activation=false&qprofile=cs-sbs-cs-default-201410-86215&p=1&languages=cs...

15:11:10.506  Generating rulesets...

15:11:10.506  Generating the FxCop ruleset: D:\workspace\MasterData\.sonarq
ube\conf\SonarQubeFxCop-cs.ruleset

15:11:10.518  Writing Roslyn generated ruleset to D:\workspace\MasterData\.sonarqube\conf\SonarQubeRoslyn-cs.ruleset...

15:11:10.534  Writing Roslyn analyzer additional file to D:\workspace\MasterData\.sonarqube\conf\cs\SonarLint.xml...

15:11:10.536  Provisioning analyzer assemblies for cs...

15:11:10.538  Installing required Roslyn analyzers...

15:11:10.538  Local analyzer cache: C:\Users\fg009adm\AppData\Local\Temp\7\.sonarqube\.static

15:11:10.538  Processing plugin: csharp version 1.23.0.1828

15:11:10.54  Cache hit: using plugin files from C:\Users\AppData\Local\Temp\7\.sonarqube\.static\csharp_1.23.0.1828\SonarAnalyzer-1.23.0.1828.zip

15:11:10.566  Pre-processing succeeded.

第二步:I执行以下MSBuild命令:

代码语言:javascript
复制
MSBuild.exe /t:Rebuild MasterDataWebServices.sln

由于MSBuild日志相当大,所以我不会在这里提供它。有一条生成成功消息,其中包含5个警告和0错误。

第三步:I执行以下SonarQube扫描器end命令:

代码语言:javascript
复制
D:\workspace\MasterData>SonarQube.Scanner.MSBuild.exe end
SonarQube Scanner for MSBuild 2.2
Default properties file was found at D:\sonar-scanner-msbuild-2.2.0.24\SonarQube.Analysis.xml
Loading analysis properties from D:\sbs1\sonar-scanner-msbuild-2.2.0.24\SonarQube.Analysis.xml

Post-processing started.

SonarQube Scanner for MSBuild 2.2

14:25:22.961  Loading the SonarQube analysis config from D:\workspace\MasterData\.sonarqube\conf\SonarQubeAnalysisConfig.xml

14:25:22.964  Not running under TeamBuild

14:25:22.964  Analysis base directory: D:\workspace\MasterData\.sonarqube

Build directory:
Bin directory: D:\workspace\MasterData\.sonarqube\bin
Config directory: D:\workspace\MasterData\.sonarqube\conf
Output directory: D:\workspace\MasterData\.sonarqube\out

Config file: D:\workspace\MasterData\.sonarqube\conf\SonarQubeAnalysisConfig.xml

Generating SonarQube project properties file to D:\workspace\MasterData\.sonarqube\out\sonar-project.properties

The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:

1. The project has not been built - the project must be built in between the begin and end steps

2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported

3. The begin, build or end steps have not all been launched from the same folder

Writing processing summary to D:\workspace\MasterData\.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube ana
lysis.

14:25:22.988  Creating a summary markdown file...

14:25:22.989  Post-processing failed. Exit code: 1
EN

回答 1

Stack Overflow用户

发布于 2017-11-08 20:54:52

我也面临着同样的问题。在我的例子中,我安装了我的Sonar版本所需要的相应的MSBuild版本,它运行得很好。

我的SonarScanner需要14.0或更高版本的MSBuild,然后是i 下载2015

在您的情况下,我相信这个版本也会工作,如果没有,您可以尝试这个版本更具体一些

希望能帮上忙。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43007353

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档