是否有人熟悉此错误以及如何解决?我正在使用Sonarqube Scanner 2.3.1和msbuild 12.0。该项目是4.5框架。
Time Elapsed 00:00:39.12
$ SonarQube.Scanner.MSBuild.exe end
SonarQube Scanner for MSBuild 2.3.1
Default properties file was found at C:\SonarQube\bin\SonarQube.Analysis.xml
Loading analysis properties from C:\SonarQube\bin\SonarQube.Analysis.xml
sonar.verbose=true was specified - setting the log verbosity to 'Debug'
Post-processing started.
11:00:26.108 Using environment variables to determine the download directory...
11:00:26.188 11:00:26.188 sonar.verbose=true was specified - setting the log verbosity to 'Debug'
11:00:26.191 Loading the SonarQube analysis config from F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\conf\SonarQubeAnalysisConfig.xml
11:00:26.191 Not running under TeamBuild
11:00:26.191 Analysis base directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube
Build directory:
Bin directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\bin
Config directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\conf
Output directory: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\out
Config file: F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\conf\SonarQubeAnalysisConfig.xml
Generating SonarQube project properties file to F:\Gitlab-Runner\builds\1d3a7e33\1\folder\folder\folder\.sonarqube\out\sonar-project.properties
Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
at SonarQube.Common.ListPropertiesProvider.TryGetProperty(String key, Property& property)
at SonarQube.Common.AggregatePropertiesProvider.TryGetProperty(String key, Property& property)
at SonarQube.Common.AggregatePropertiesProvider.GetAllProperties()
at SonarScanner.Shim.PropertiesFileGenerator.GetAnalysisProperties(AnalysisConfig config)
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)
ERROR: Job failed: exit status 3762504530
答案 0 :(得分:0)
问题是由名为sonar.analysis.mode的属性设置为等于“issues”引起的。
不应手动使用问题模式,因为它仅由工具使用。 设置你的sonar.analysis.mode = [预览/发布] (发布是默认的,因此您根本不需要设置属性。)