2

我在执行命令时遇到了这个崩溃SonarQube.Scanner.MSBuild.exe end::

SonarQube.Old.Bootstrapper has stopped working

更多日志:

enter code here SonarQube Scanner for MSBuild 2.3.1
Default properties file was found at C:\SonarQube\SonarQube.Analysis.xml
Loading analysis properties from C:\SonarQube\SonarQube.Analysis.xml
Post-processing started.

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at SonarScanner.Shim.PropertiesWriter.WriteSettingsForProject(ProjectInfo project, IEnumerable`1 files, String fxCopReportFilePath, String codeCoverageFilePath)
   at SonarScanner.Shim.PropertiesFileGenerator.ProcessProjectInfoFiles(IEnumerable`1 projects, PropertiesWriter writer, ILogger logger, String projectBaseDir, String globalSourceEncoding)
   at SonarScanner.Shim.PropertiesFileGenerator.GenerateFile(AnalysisConfig config, ILogger logger, IRoslynV1SarifFixer fixer)
   at SonarScanner.Shim.SonarScannerWrapper.Execute(AnalysisConfig config, IEnumerable`1 userCmdLineArguments, ILogger logger)
   at 


  SonarQube.TeamBuild.PostProcessor.MSBuildPostProcessor.InvokeSonarScanner(IAnalysisPropertyProvider cmdLineArgs, AnalysisConfig config)
   at 
     SonarQube.TeamBuild.PostProcessor.MSBuildPostProcessor.Execute(String[]args, AnalysisConfig config, ITeamBuildSettings settings)
     at SonarQube.Bootstrapper.BootstrapperClass.PostProcess()
     at SonarQube.Bootstrapper.BootstrapperClass.Execute()
     at SonarQube.Bootstrapper.Program.Execute(String[] args, ILogger logger)
     at SonarQube.Bootstrapper.Program.Main(String[] args)
4

1 回答 1

0

我有完全相同的问题。我找到了一个链接(不幸的是我再也找不到它了),说这是因为声纳无法导出源文件编码。

我添加了 Sonar.SourceEncoding=UTF8 属性,一切顺利。

于 2017-12-14T19:54:59.610 回答