我正在使用新的MSBuild SonarQube Runner v1.0试用SonarQube。
预处理工作正常
E:\sonarQube\MSBuild.SonarQube.Runner-1.0>MSBuild.SonarQube.Runner.exe begin /k:"MyKey" /n:"MyProject" /v:"1.0"
.......
Process returned exit code 0
Pre-processing succeeded.然后MSBuild就可以工作了
E:\sonarQube\WebApplication2013>msbuild
Microsoft (R) Build Engine version 4.0.30319.34209
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.
........
Done Building Project "E:\sonarQube\WebApplication2013\WebApplication2013.sln" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:00.51生成错误后的结束命令
E:\sonarQube\MSBuild.SonarQube.Runner-1.0>MSBuild.SonarQube.Runner.exe end
.......
6:35:10 PM Generating SonarQube project properties file to E:\sonarQube\MSBuild.SonarQube.Runner-1.0\.sonarqube\out\sonar-project.properties
6:35:10 PM No ProjectInfo.xml files were found. Check that the analysis targets are referenced by the MSBuild projects being built.
6:35:10 PM Writing processing summary to E:\sonarQube\MSBuild.SonarQube.Runner-1.0\.sonarqube\out\ProjectInfo.log
6:35:10 PM Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
6:35:10 PM Creating a summary markdown file...
Process returned exit code 1
Post-processing failed. Exit code: 1需要你的帮助
发布于 2015-09-11 17:54:31
正如duncanpMS的评论所指出的,您需要运行您想要分析的项目文件夹中的所有3个命令。
下面是如何实现的:
cd E:\sonarQube\WebApplication2013E:\sonarQube\MSBuild.SonarQube.Runner-1.0\MSBuild.SonarQube.Runner.exe begin /k:"MyKey" /n:"MyProject" /v:"1.0"msbuild /t:rebuildE:\sonarQube\MSBuild.SonarQube.Runner-1.0\MSBuild.SonarQube.Runner.exe end您可以将E:\sonarQube\MSBuild.SonarQube.Runner-1.0添加到%PATH%环境变量中,以便在分析项目时只需从命令行输入MSBuild.SonarQube.Runner.exe,而不是完整路径。
发布于 2016-04-07 05:13:11
您需要msbuild版本12或版本14。如果您有VS2013,则Msbuild版本12随附。如果您有VS2015,Msbuild版本14会附带它。
如果还没有,请下载Microsoft Build Tools 2013或2015。
在解决方案文件夹中按顺序运行这3个命令之前,请先运行Msbuild -version以验证版本。
https://stackoverflow.com/questions/32505626
复制相似问题