SonarScanner.MSBuild.exe: command not found

Hi ,

I have integrated sonar cloud with bitbucket repository using a pipeline. when i run the Msbuild in my local machine its working fine but everytime i do a commit build is failing with the error “SonarScanner.MSBuild.exe: command not found”. i would like to know your thoughts on this.

Hi @chamodh93, do you have SonarScanner for MSBuild installed on your build agent? You could download it from here:
https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild

and don’t forget to put its directory to the system PATH variable.

1 Like


Hi,
Same here , followed steps as they given but still I’m getting
set up: export PATH=/home/anil/Desktop/install_directory:$PATH
Error: SonarScanner.MSBuild.exe: command not found.

Hi @Anil_kumar_Bandi

On linux, you can only download and use the .NET Core flavor of the Scanner, invokable by the dll instead of an exe.

HTH,