ERROR: Error during SonarScanner execution after executing SonarScanner.MSBuild.exe end command

Sonarqube Version -7.9.5
SonarQube Scanner - sonar-scanner-msbuild-5.0.4.24009-net46
Source code contains - C#, angular.js, html5, javascript.

Hi,

I executed the following commands and after executing the 3rd command I am getting execution failure error.

The command I executed in the CMD prompt are,

  1. SonarScanner.MSBuild.exe begin /k:“Demo” /d:sonar.host.url=“http://localhost:9000” /d:sonar.login=“68cd5d3a98973949bfa4bfba0a9a5d63b673eca0”

  2. MsBuild.exe /t:Rebuild

  3. SonarScanner.MSBuild.exe end /d:sonar.login=“68cd5d3a98973949bfa4bfba0a9a5d63b673eca0”

ERROR: Error during SonarScanner execution
org.sonar.java.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property

I found one similar kind of issue reported where it is said that due to .java file present in the code the issue occurs, in our code as well .java files are present, not sure the use of them.
How can I exclude those .java files while SonarQube analysis is performed and in which file do I need to add exclusion code?

Also, if there is some another solution to resolve this issue, then please let me know as I have very limited knowledge of sonar.

Link of similar issue -

Hello @SRP , I will be happy to help you. Feel free to have a look at this URL https://docs.sonarqube.org/latest/analysis/analysis-parameters/. Here you will find a way to set project analysis parameters. You could try setting sonar.exclusions to something like **/*.java and see if it works.