Hi, I have an issue "The main branch of this project is empty."

Please help me solve an issue
I use sonar-scanner-4.4.0.2170, my project - C#, I launch scanner by job (via .gitlab-ci.yml)
script:
- |-

  echo @"
  sonar.projectName=SMB-ui-tests
  sonar.projectVersion=$env:CI_PIPELINE_ID
  sonar.projectKey=xxxxxxx
  sonar.host.url=https://xxxxx:3333/
  sonar.sourceEncoding=windows-1251
  sonar.language=cs
  sonar.projectBaseDir=$env:CI_PROJECT_DIR
  sonar.sources=./Rbp.UITests.SpecFlow,./Rbp.UITests.Common
  sonar.exclusions=ashot-dotnet-master/**,.git/**


  "@ > sonarQube.properties
  
- sonar-scanner -X -e -D sonar.host.url=https://xxxxxxx:3333/ -D sonar.projectName=SMB-ui-tests -D sonar.projectKey=xxxxxxx -D project.settings=$CI_PROJECT_DIR/sonarQube.properties -D sonar.projectBaseDir=$env:CI_PROJECT_DIR -D sonar.exclusions=ashot-dotnet-master/**,.git/** -D com.sun.net.ssl.checkRevocation=false

I have problem that “ANALYSIS SUCCESSFUL” but there are no results

Hello,

I’ve got the feeling you want to scan C# code because you configured the property sonar.language=cs. First you should know this property is useless and ignored (https://jira.sonarsource.com/browse/SONAR-11449)

If you want to scan a .NET Solution, you should not use the sonar-scanner binary but use the SonarQube Scanner for MSBuild.

Alex

I am having the same issue when trying to analyze for Java Project. Do we have a reason for this behavior?