Msbuild 运行SonarQube时出错-未找到ProjectInfo.xml文件

Msbuild 运行SonarQube时出错-未找到ProjectInfo.xml文件,msbuild,cruisecontrol.net,sonarqube5.2,Msbuild,Cruisecontrol.net,Sonarqube5.2,我使用SonarQube 5.2来计算指标。 当我使用“Developer命令提示符for VS2013”运行它时,一切正常 但是,当我使用普通命令提示符“cmd.exe”运行相同的命令时,无论是否具有管理员权限,都会出现以下错误 C:\Windows\system32>"C:\sonarqube-5.2\bin\MSBuild.SonarQube.Runner.exe" end SonarQube Scanner for MSBuild 1.1 Default properties fi

我使用SonarQube 5.2来计算指标。 当我使用“
Developer命令提示符for VS2013
”运行它时,一切正常

但是,当我使用普通命令提示符“
cmd.exe
”运行相同的命令时,无论是否具有管理员权限,都会出现以下错误

C:\Windows\system32>"C:\sonarqube-5.2\bin\MSBuild.SonarQube.Runner.exe" end
SonarQube Scanner for MSBuild 1.1
Default properties file was found at C:\sonarqube-5.2\bin\SonarQube.Analysis.xml

Loading analysis properties from C:\sonarqube-5.2\bin\SonarQube.Analysis.xml
Post-processing started.
MSBuild SonarQube Runner Post-processor 1.0.2.0
11:39:29.774  sonar.verbose=true was specified - setting the log verbosity to 'Debug'
11:39:29.774  Loading the SonarQube analysis config from C:\Windows\system32\.sonarqube\conf\SonarQubeAnalysisConfig.xml
11:39:29.774  Not running under TeamBuild
11:39:29.774  Analysis base directory: C:\Windows\system32\.sonarqube
Build directory:
Bin directory: C:\Windows\system32\.sonarqube\bin
Config directory: C:\Windows\system32\.sonarqube\conf
Output directory: C:\Windows\system32\.sonarqube\out
Config file: C:\Windows\system32\.sonarqube\out
Generating SonarQube project properties file to C:\Windows\system32\.sonarqube\out\sonar-project.properties
No ProjectInfo.xml files were found. Possible causes: you specified an invalid build configuration or the custom MSBuild analysis targets were not imported.
Writing processing summary to C:\Windows\system32\.sonarqube\out\ProjectInfo.log

Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
11:39:29.79  Creating a summary markdown file...
Post-processing failed. Exit code: 1
请让我知道可能出现的问题以及如何解决

我遵循以下步骤:

  • 从一个位置执行所有命令示例-“
    D:\Test
  • 在PATH环境变量中添加了以下内容 A.MSBUILD的12.0文件夹的路径
  • 为分析指标而执行的命令, A.MSBuild.SonarQube.Runner.exe开始 BMSBuild abc.csproj
    /t:Clean;重建/p:VisualStudioVersion=12.0
    c<代码>MSBuild.SonarQube.Runner.exe
    end
  • 我找到了解决办法

    我应该使用MSBuild的完整路径,而不是将其放入path变量中,这会导致SonarQube分析出现此问题

    -->

  • MSBuild.SonarQube.Runner.exe开始
  • %programfiles(x86)%\msbuild\12.0\bin\msbuild.exe“abc.csproj/t:Clean;重建/p:VisualStudioVersion=12.0
  • MSBuild.SonarQube.Runner.exe结束
  • 我找到了解决办法

    我应该使用MSBuild的完整路径,而不是将其放入path变量中,这会导致SonarQube分析出现此问题

    -->

  • MSBuild.SonarQube.Runner.exe开始
  • %programfiles(x86)%\msbuild\12.0\bin\msbuild.exe“abc.csproj/t:Clean;重建/p:VisualStudioVersion=12.0
  • MSBuild.SonarQube.Runner.exe结束
  • 这很有效

    每次执行完成后,请逐个使用以下代码行:

    SonarQube.Scanner.MSBuild.exe begin/k:“ProjectKeyName”/n:“ProjectName”/v:“1.0”

    “C:\Program Files(x86)\MSBuild\14.0\Bin\MSBuild.exe”/t:Rebuild

    SonarQube.Scanner.MSBuild.exe结束

    注:

    请将ProjectKeyname和projectName替换为您的(根据项目根文件夹下创建的sonar-project.properties文件)

    使用的版本: sonarqube-5.6.6(也在sonarqube-6.4中测试), sonar-scanner-msbuild-3.0.0.629这很有效

    每次执行完成后,请逐个使用以下代码行:

    SonarQube.Scanner.MSBuild.exe begin/k:“ProjectKeyName”/n:“ProjectName”/v:“1.0”

    “C:\Program Files(x86)\MSBuild\14.0\Bin\MSBuild.exe”/t:Rebuild

    SonarQube.Scanner.MSBuild.exe结束

    注:

    请将ProjectKeyname和projectName替换为您的(根据项目根文件夹下创建的sonar-project.properties文件)

    使用的版本: sonarqube-5.6.6(也在sonarqube-6.4中测试),
    sonar-scanner-msbuild-3.0.0.629

    提供的信息是否足够或需要更多详细信息?有人能建议我如何实现我的查询吗?有点晚了,但您是否解决了您的问题?提供的信息是否足够或需要更多详细信息?有人能建议我如何实现我的查询吗?有点晚了,但你解决了你的问题了吗?