Santiago109
Santiago109

Reputation: 39

error trying to analyse with Error on MSBuild.SonarQube.Runner.exe

I’m trying to run C# Code Analysis on jenkins but always get this error

/var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: 1:
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe:
 MZ����@���: not found 
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: 1: 
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: ��kO����j: not found 
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: 22: 
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: ��V�0N Jl �@ ���.rsrc��P@@.reloc�X@B,lH,�2,�^�@j�0}s �~rp�)%rp�(7s o ~rp�)%r-p�(8s o ~~ o ~~ o *0�-r5ps z-rUps zQ~s o ( _�( o o (  (! _�i(_,=�%�%�s: File name too long 
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: 23: 
 /var/jenkins_home/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQube_Scanner_for_MSBuild_2.0/MSBuild.SonarQube.Runner.exe: Syntax error: word unexpected (expecting ")") 
 ERROR: Execution of SonarQube Scanner for MSBuild failed (exit code 2) Finished: FAILURE

Upvotes: 0

Views: 729

Answers (1)

You are trying to execute a Windows binary (a ".exe" file) on a Unix like operating system. No wonder why this can not work.

If you want to build .NET solution using the SonarQube Scanner for Jenkins and the SonarQube Scanner for MSBuild, then you must explicitly configure the job to get executed on a Windows machine.

Upvotes: 4

Related Questions