2

I got this crash while executing command: SonarQube.Scanner.MSBuild.exe end:

SonarQube.Old.Bootstrapper has stopped working

More logs:

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)
janos
  • 120,954
  • 29
  • 226
  • 236
avk
  • 21
  • 4
  • i'm running sonar scanner on my visual studio 2013 .sln project p(c++) , where build and be-gaining is succeeded but "end" command is failing with this crash – avk May 13 '17 at 07:23

1 Answers1

0

I had the exact same issue. I found a link (Unfortunately I cannot find it again), saying that its because sonar cannot derive the source file encoding.

I added the Sonar.SourceEncoding=UTF8 property, and everything went by, just fine.

Kaj Bonfils
  • 416
  • 4
  • 10