1

新しい MSBuild SonarQube Runner v1.0 を使用して SonarQube を試しています。

前処理はうまくいきます

E:\sonarQube\MSBuild.SonarQube.Runner-1.0>MSBuild.SonarQube.Runner.exe begin /k:"MyKey" /n:"MyProject" /v:"1.0"
.......
Process returned exit code 0
Pre-processing succeeded.

その後、MSBuild が動作します

E:\sonarQube\WebApplication2013>msbuild
Microsoft (R) Build Engine version 4.0.30319.34209
[Microsoft .NET Framework, version 4.0.30319.34209]
Copyright (C) Microsoft Corporation. All rights reserved.
........

Done Building Project "E:\sonarQube\WebApplication2013\WebApplication2013.sln" (default targets).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.51

end コマンドに続くエラーが発生している間

E:\sonarQube\MSBuild.SonarQube.Runner-1.0>MSBuild.SonarQube.Runner.exe end
.......
6:35:10 PM  Generating SonarQube project properties file to E:\sonarQube\MSBuild.SonarQube.Runner-1.0\.sonarqube\out\sonar-project.properties
6:35:10 PM  No ProjectInfo.xml files were found. Check that the analysis targets are referenced by the MSBuild projects being built.
6:35:10 PM  Writing processing summary to E:\sonarQube\MSBuild.SonarQube.Runner-1.0\.sonarqube\out\ProjectInfo.log
6:35:10 PM  Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
6:35:10 PM  Creating a summary markdown file...
Process returned exit code 1
Post-processing failed. Exit code: 1

あなたの助けが必要でした

4

2 に答える 2

2

duncanpMS のコメントで指摘されているように、分析するプロジェクトのフォルダーから 3 つのコマンドをすべて実行する必要があります。

方法は次のとおりです。

  1. cd E:\sonarQube\WebApplication2013
  2. E:\sonarQube\MSBuild.SonarQube.Runner-1.0\MSBuild.SonarQube.Runner.exe begin /k:"MyKey" /n:"MyProject" /v:"1.0"
  3. msbuild /t:rebuild
  4. E:\sonarQube\MSBuild.SonarQube.Runner-1.0\MSBuild.SonarQube.Runner.exe end

プロジェクトを分析するときに、コマンド ラインからフル パスの代わりに入力するだけで済むように、環境変数E:\sonarQube\MSBuild.SonarQube.Runner-1.0に追加できます。%PATH%MSBuild.SonarQube.Runner.exe

于 2015-09-11T09:54:30.553 に答える
1

msbuild バージョン 12 またはバージョン 14 が必要です。VS2013 を使用している場合は、Msbuild バージョン 12 が付属しています。VS2015 を使用している場合は、Msbuild バージョン 14 が付属しています。

をお持ちでない場合は、Microsoft Build Tools 2013 または 2015 をダウンロードしてください。

Msbuild -versionソリューション フォルダーで 3 つのコマンドを順番に実行する前に、バージョンを確認するために実行します。

于 2016-04-06T21:13:10.657 に答える