未找到 ProjectInfo.xml 个文件。生成声纳属性文件失败

No ProjectInfo.xml files were found. Generation of the sonar-properties file failed

我正在尝试配置我的项目以将一些分析数据发送到 SonarQube 服务器。我 运行 MSBuild.SonarQube.Runner.exe begin 命令后跟 msbuild。我的解决方案有 3 个项目库和 1 个单元测试项目。

begin 命令和 msbuild 运行 没有任何错误,但 end 命令输出以下错误并且没有数据发布到 SonarQube 服务器。

C:\solutions> "C:\SonarQube Runner\MSBuild.SonarQube.Runner.exe" end
MSBuild SonarQube Runner Bootstrapper 1.0.2.0
Default properties file was found at C:\SonarQube Runner\SonarQube.Analysis.xml
Loading analysis properties from C:\SonarQube Runner\SonarQube.Analysis.xml
Post-processing started.
MSBuild SonarQube Runner Post-processor 1.0.2.0
No ProjectInfo.xml files were found. Possible causes: you specified an invalid build configuration or the custom MSBuild analysis targets were not imported. Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
13:58:45.786  Creating a summary markdown file...
Post-processing failed. Exit code: 1

现在确定我做错了什么。你能帮忙吗?如果我需要提供更多信息,请告诉我。

谢谢

确保您是 运行 MSBuild 版本 12 或 14 来构建和分析您的项目,并确保您是 运行 beginend SonarQube Scanner for MSBuild 命令以及同一文件夹中的 msbuild 命令。

我遇到了同样的问题,原来是我没有安装MSBuild 12.0。一旦安装它就可以完美地工作:)

你可以在这里得到它http://www.microsoft.com/en-us/download/details.aspx?id=40760