-
In Jenkins,I have a job to exec sonarqube scan,but something wrong .
dotnet /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/DotnetBuild/SonarScanner.MSBuild.dll begin /k:lvyequan-server /n:lvyequan-server /v:1.1 /d:sonar.host.url=http://192.168.0.149:9000 ********
SonarScanner for MSBuild 4.5
Using the .NET Core version of the Scanner for MSBuild
Default properties file was found at /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/DotnetBuild/SonarQube.Analysis.xml
Loading analysis properties from /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/DotnetBuild/SonarQube.Analysis.xml
Pre-processing started.
Preparing working directories…
07:07:43.439 Updating build integration targets…
Unhandled Exception: System.ArgumentException: Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.
at System.Reflection.RuntimeMethodInfo.CreateDelegateInternal(Type delegateType, Object firstArgument, DelegateBindingFlags bindingFlags, StackCrawlMark& stackMark)
at System.Reflection.RuntimeMethodInfo.CreateDelegate(Type delegateType)
at System.Environment.<>c.b__52_0()
at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Func1 valueFactory) at System.Environment.GetFolderPathCore(SpecialFolder folder, SpecialFolderOption option) at System.Environment.GetFolderPath(SpecialFolder folder, SpecialFolderOption option) at SonarScanner.MSBuild.Common.MsBuildPathSettings.<GetLocalApplicationDataPaths>d__8.MoveNext() at System.Linq.Enumerable.DistinctIterator
1.MoveNext()
at System.Linq.Enumerable.SelectManySingleSelectorIterator2.ToList() at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 source)
at SonarScanner.MSBuild.Common.MsBuildPathSettings.GetImportBeforePaths()
at SonarScanner.MSBuild.PreProcessor.TargetsInstaller.InternalCopyTargetsFile()
at SonarScanner.MSBuild.PreProcessor.TargetsInstaller.InstallLoaderTargets(String workDirectory)
at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.DoExecute(ProcessedArgs localSettings)
at SonarScanner.MSBuild.BootstrapperClass.PreProcess()
at SonarScanner.MSBuild.BootstrapperClass.Execute()
at SonarScanner.MSBuild.Program.Execute(String args, ILogger logger)
at SonarScanner.MSBuild.Program.Main(String args)
ERROR: Execution of SonarScanner for MSBuild failed (exit code 134)