我安装了这样的..。
声纳-6.2声纳-扫描仪-2.8倍声纳-扫描仪- msbuild -2.2.0.24
我制作了windows批处理文件来构建和扫描(声纳)。但有些项目没问题。但有些项目失败了。
批处理文件是..。
MSBuild.SonarQube.Runner.exe begin /k:%PROJECT_KEY% /n:%PROJECT_NAME% /v:%BUILD_VERSION% /d:sonar.verbose=true MSBuild.exe "projects“/t:build /v:m MSBuild.SonarQube.Runner.exe结束
错误信息是..。
在C:\SONARQUBE\sonar-scanner-msbuild-2.2.0.24\SonarQube.Analysis.xml加载分析属性时,从C:\SONARQUBE\sonar-scanner-msbuild-2.2.0.24\SonarQube.Analysis.xml后处理开始找到SonarQube Scanner for MSBuild 2.2默认属性文件。从C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\conf\SonarQubeAnalysisConfig.xml 18:50:20.592加载SonarQube分析配置的SonarQube扫描程序: MSBuild 2.2 18:50:20.591没有在TeamBuild 18:50:20.593分析基目录: C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube构建目录: Bin目录: C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\bin config目录下运行:C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\conf输出目录: C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\out Config文件: C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\conf\SonarQubeAnalysisConfig.xml生成SonarQube项目属性文件到C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\out\sonar-project.properties SonarQube MSBuild集成失败: SonarQube无法收集有关项目的所需信息。 可能的原因:
将处理摘要写入声纳属性文件的C:\jenkins_slave_buildpc\workspace\amis3_client_sonar.sonarqube\out\ProjectInfo.log生成失败。无法完成SonarQube分析。18:50:20.615创建一个摘要标记文件..。18:50:20.617后处理失败。出口代码:1
我为声纳执行了同样的批处理文件。但有些项目没问题。有些项目失败了。是什么导致了这条错误消息?
发布于 2017-08-31 23:23:30
在teamcity中运行MSBuild.SonarQube.Runner end命令时,我也遇到了类似的错误。构建项目的开始步骤和MSBuild步骤运行良好。
当我给跑步者和团队中的MSbuild提供完整的路径时。对我起作用了。
C:\SonarQube\sonar-scanner-msbuild-3.0.2.656\MSBuild.Sonarqube.runner.exe
begin /k:"Sonar key here" /n:"Sonar project here" /v:%build.number%
/d:sonar.log.level=DEBUG
"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" [path for .sln file
here] /t:Rebuild
/p:VisualStudioversion=14.0;Configuration=Release;Platform="Any CPU"
C:\SonarQube\sonar-scanner-msbuild-3.0.2.656\MSBuild.Sonarqube.runner end发布于 2018-02-14 18:29:28
另一件值得检查的事情--尤其是当您试图从构建服务器上运行SonarQube时--是它是否在本地系统配置文件中运行。从日志中可以看到如下内容:
Installed SonarQube.Integration.ImportBefore.targets to C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBefore我发现这个路径并不存在,尽管SonarQube的扫描器很高兴地宣称已经在那里安装了它的目标。我的解决方案是创建一个用于执行构建任务的构建代理帐户。这将导致SonarQube将其目标安装到用户配置文件MSBuild文件夹中。例如:
C:\Users\buildagent\AppData\Local\Microsoft\MSBuild\15.0\Microsoft.Common.targets\ImportBeforehttps://stackoverflow.com/questions/41395737
复制相似问题