How to build With sonarscanner ,getting “MSbuild.exe is not recognize as internal and external command”?

Hi Im very new to SonarQube. I was trying to analyze my code using SonarQube but it is throwing the following errors

  1. “MSBuild.exe is not recognize as internal or external command”
    while executing the below command.
    SonarScanner.MSBuild.exe begin /k:“org.sonarqube:sonar-scanner-msbuild” /n:“Project
    Name” /v:“1.0”
    I’m using VS2017 and installed msbuild.exe , do we need to configure any environment variable for fix the issue ?
  2. when I head to localhost://9000 its asking me login credentials.I have tried to login with my system admin credential but no luck.


Thank you for your interest in SonarQube! I’ll get straight to the answers:

  • SonarScanner.MSBuild.exe should be in the directory where you extracted the Sonar Scanner ZIP file. To execute it from another directory you should either put its location in the system PATH, or specify the full file name. For example, my SonarScanner for MSBuild is installed in c:\Work\Tools\scanner-msbuild-4.4 and I am analyzing a project in c:\Work\temp\SharpZipLib:

  • SonarQube uses it’s own built-in authentication system and the default username is: admin, the default password - admin. For localhost you don’t need to change the default admin password, but please make sure you are using a strong password for your production instance.

Kind regards,

1 Like

Thanks for the instant reply . Happy to say that this worked for me . Thanks

A post was split to a new topic: Error when scanning with scanner for msbuild

I cannot find SonarScanner.MSBuild.exe in the ZIP file. I have downloaded from

1 Like

hi @elvetian! the netcore app contains a DLL, you need to download the net framework version if you want an EXE

See SonarScanner for MSBuild for details.