C# Code Coverage Results Import を実行しようとしていますが、最後のステップでエラーが発生します。Visual Studio (TEST -Analyze Code Coverage- All Tests) を介して .coveragexml ファイル (test.coveragexml という名前) を作成し、プロジェクト ディレクトリに保存しました。CMD で次のコマンドを実行します。
- C:\SonarQube\bin\MSBuild.SonarQube.Runner.exe begin /k:MyProject /n: MyProject /v:1.0 /d:sonar.cs.vscoveragexml.reportsPaths=D:\sTFS\24115\Sources\ MyProject \Source *.coveragexml /d:sonar.verbose=true
- ビルド (ビジュアル スタジオ経由)
- C:\SonarQube\bin\MSBuild.SonarQube.Runner.exe終了
最後のステップで、次のエラーが発生します。
10:09:29 AM ERROR: Error during Sonar runner execution
10:09:29 AM ERROR: Unable to execute Sonar
10:09:29 AM ERROR: Caused by: Error while parsing the XML file: D:\sTFS\24115\S
ources\SystemMapping\Source\test.coveragexml
10:09:29 AM ERROR: Caused by: Unexpected character '?' (code 65533 / 0xfffd) in
prolog; expected '<'
10:09:29 AM at [row,col {unknown-source}]: [1,1]
10:09:29 AM ERROR:
10:09:29 AM ERROR: To see the full stack trace of the errors, re-run SonarQube
Runner with the -e switch.
10:09:29 AM ERROR: Re-run SonarQube Runner using the -X switch to enable full d
ebug logging.
10:09:29 AM The sonar-runner did not complete successfully
Post-processing failed. Exit code: 1
文字「?」が見つかりません ファイルで... ログから:
M 10:09:29.021 INFO - Sensor org.sonar.plugins.csharp.CSharpSensor@5945ac done: 12370 ms
10:09:29 AM 10:09:29.021 INFO - Sensor org.sonar.plugins.csharp.CSharpCodeCoverageProvider$CSharpCoverageReportImportSensor@ed32df...
10:09:29 AM 10:09:29.104 INFO - Parsing the Visual Studio coverage XML report D:\sTFS\24115\Sources\SystemMapping\Source\test.coveragexml
10:09:29 AM 10:09:29.110 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@101ba81[id=37975,key=SystemMapping,qualifier=TRK], with key batch-SystemMapping
10:09:29 AM INFO: ------------------------------------------------------------------------
10:09:29 AM INFO: EXECUTION FAILURE
10:09:29 AM INFO: ------------------------------------------------------------------------
10:09:29 AM Total time: 21.544s
10:09:29 AM Final Memory: 13M/121M
10:09:29 AM INFO: ------------------------------------------------------------------------
10:09:29 AM Process returned exit code 1
10:09:29 AM Creating a summary markdown file...
Process returned exit code 1