I habe a TFS-Server-Build (TFS 2017( on a Build-Agent with VS 2017.第一个构建步骤(准备 Sonarqube 分析(和解决方案的构建工作正常。但是我在"完成SonarQube分析"中有一个错误:
2017-05-29T03:06:09.1933915Z ##[error]The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
2017-05-29T03:06:09.1933915Z ##[error]Possible causes:
2017-05-29T03:06:09.1933915Z ##[error]1. The project has not been built - the project must be built in between the begin and end steps
2017-05-29T03:06:09.1933915Z ##[error]2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 12.0 upwards are supported
2017-05-29T03:06:09.1933915Z ##[error]3. The begin, build or end steps have not all been launched from the same folder
2017-05-29T03:06:09.1933915Z Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
2017-05-29T03:06:09.1933915Z ##[error]05:06:09.115 Post-processing failed. Exit code: 1
谁能帮忙?
亲切问候塞巴斯蒂安
我不熟悉TFS-Server-Build,但提到了可能的原因。查看以下链接以获取有关如何正确设置的更多详细信息
提到的错误一样,这代表SonarQube was unable to collect the required information about your projects
即使已安装 MSBUILD 12 或更高版本,也应确保生成代理调用正确的版本。
并仔细检查MSBuild.SonarQube.Runner
和MSBuild
是否从同一工作目录运行。 在.sonarqube/out
文件夹中,是否正在创建sonar-project.properties。