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

时间:2015-11-13 20:38:11

标签: c# msbuild sonarqube

我正在尝试配置我的项目以将一些分析数据发送到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

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

谢谢

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:1)

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

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