I followed the installation process and got to the SonarScanner for MSBuild for .NET Framework or .NET Core part but after this it seems I need to have an .exe in the extracted filed which I dont so can not move forward. I am getting; “‘SonarScanner.MSBuild.exe’ is not recognized as an internal or external command, operable program or batch file.” error when I search it tells to add the .exe to path but there is no .exe as I said before.
@farukbenli, hi there! Can we do this one more time together? Try downloading and unzipping this SonarScanner. In the extracted folder you will see the file you are looking for. You need to add this folder to PATH of your current user (for example) and restart IDE.
this actualy has the exe in it. I don’t know if you are responsible for it but the guide from sonar sends us to the site where we download a file without exe in it.
@farukbenli, I see. The page you’ve provided states that:
There are two versions of the SonarScanner for MSBuild.
(and this is the version I gave you)
The first version is based on the “classic” .NET Framework. To use it, execute the following commands from the root folder of your project:
and
The second version is based on .NET Core which has a very similar usage:
(probably that’s the one you’ve downloaded for the first time)
dotnet “path to SonarScanner.MSBuild.dll” begin /k:“project-key” /o:“” /d:sonar.login=“”
dotnet build
dotnet “path to SonarScanner.MSBuild.dll” end /d:sonar.login=“”
So since you’ve downloaded .NET Core version, you could use it as suggested in the docs provided. Let me know if that won’t work for you - I will be happy to help!