首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将SonarQube Msbuild runner与TeamCity集成时出错

将SonarQube Msbuild runner与TeamCity集成时出错
EN

Stack Overflow用户
提问于 2016-08-29 16:23:47
回答 1查看 1.2K关注 0票数 0

我有一个团队城市构建,我已经添加了构建开始和结束操作来进行声音分析,在这两个任务之间有一个使用msbuild的构建。当SonarQube插件执行end阶段时,它会失败,并显示以下错误。

代码语言:javascript
复制
[10:16:52][Step 5/9] Starting: C:\sonarqube\Runner\MSBuild.SonarQube.Runner.exe end
[10:16:52][Step 5/9] in directory: C:\agents\build2\work\a6252c8eea7552b3\src
[10:16:52][Step 5/9] SonarQube Scanner for MSBuild 2.0
[10:16:52][Step 5/9] Default properties file was found at C:\sonarqube\Runner\SonarQube.Analysis.xml
[10:16:52][Step 5/9] Loading analysis properties from C:\sonarqube\Runner\SonarQube.Analysis.xml
[10:16:53][Step 5/9] Post-processing started.
[10:16:53][Step 5/9] SonarQube Scanner for MSBuild End Step 2.1
[10:16:53][Step 5/9] The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
[10:16:53][Step 5/9] Possible causes:
[10:16:53][Step 5/9]   1. The project has not been built - the project must be built in between the begin and end steps
[10:16:53][Step 5/9]   2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported
[10:16:53][Step 5/9]   3. The begin, build or end steps have not all been launched from the same folder
[10:16:53][Step 5/9] Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
[10:16:53][Step 5/9] 10:16:53.266  Creating a summary markdown file...
[10:16:53][Step 5/9] Post-processing failed. Exit code: 1
[10:16:53][Step 5/9] Process exited with code 1
[10:16:53][Step 5/9] Step Finish SonarQube analysis (Command Line) failed

如果我登录到服务器,则打开与代理完全相同的目录,并手动执行构建所执行的三个步骤。

代码语言:javascript
复制
C:\sonarqube\Runner\MSBuild.SonarQube.Runner.exe begin /k:"Metrics.Net.Es" /n:"Metrics.Net.Es" /v:"1.0"
msbuild mysolution.sln
C:\sonarqube\Runner\MSBuild.SonarQube.Runner.exe end

一切运行得很好。

可能的错误是什么?

EN

回答 1

Stack Overflow用户

发布于 2016-08-29 16:31:54

我已经找到了解决方案,我需要在TeamCity中为MSBUILD run操作指定工作目录。在我设置了这个值之后,分析进行得很顺利。如果我把这个值留空,我会得到前面的错误。

吉安·玛丽亚。

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

https://stackoverflow.com/questions/39201642

复制
相关文章

相似问题

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