'MSbuild.exe' is not recognized as an internal or external command, operable program or batch file

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    sonarqube-8.3.1.34397, sonar-scanner-msbuild-4.7.1.2311-net46, c# project with .net framework 4.8

I am able to run the first step, however facing the issue in step 2 - Msbuild.exe /t:Rebuild

Please help.

Hello,

Before trying to scan your code with SonarQube, you should make sure you have everything to compile your Solution.

I believe you don’t have any Tools for VS installed on your machine.
MSBuild.exe is provided by Microsoft when you install Visual Studio or when you install “Build Tools for Visual Studio”. This can be downloaded from https://visualstudio.microsoft.com/downloads/, then locate “Tools for Visual Studio 2019” and choose “Build Tools for Visual Studio 2019”.

Alex

Hi Alex,

Thanks for responding.

I have downloaded and installed

But I am still facing the same issue.

Thanks and Regards,
Jagmeet

Hi, I’m also facing the same issue pls check screenshot… and have already installed Visual Studio 2019 and I’m able to build my project properly on it.


pls, help…

thanks in advance

do you have the folder containing MSBuild.exe in your system PATH env var?

thanks for the reply… yes I found the folder containing MSBuild.exe and set the PATH env for the same then it works…

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.