SonarQube无法完成构建后步骤

时间:2016-04-21 09:28:16

标签: c# jenkins sonarqube windows-server-2012-r2 sonarqube-msbuild-runner

我在Windows 2012 R2上安装了Jenkins Server。这些是我的构建设置:

enter image description here

在下面你会看到错误。应该说预构建步骤成功运行:

[Test CSharp Build Job] $ ...\Jenkins\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\MSBuild_2.0\MSBuild.SonarQube.Runner.exe end
SonarQube Scanner for MSBuild 2.0
Default properties file was found at ...\Documents\Jenkins\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\MSBuild_2.0\SonarQube.Analysis.xml
Loading analysis properties from ...\Documents\Jenkins\.jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\MSBuild_2.0\SonarQube.Analysis.xml
Post-processing started.
SonarQube Scanner for MSBuild End Step 1.1
No ProjectInfo.xml files were found. Possible causes: 
1. The project has not been built - the end step was called right after the begin step, without a build step in between 
2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported
3. The build step has been launched from a different working folder
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
11:18:18.015  Creating a summary markdown file...
Post-processing failed. Exit code: 1
ERROR: Execution of SonarQube Scanner for MSBuild failed (exit code 1)

所以在我的Jenkins配置中,我有这个:

enter image description here

我错过了一些可以使这项工作的东西吗?

1 个答案:

答案 0 :(得分:3)

好的,我想出来了

我忘了在建筑物之间添加/t:rebuild和MSBuild并运行End Analysis命令。