2022-01-21T15:12:32.4386976Z 15:12:30.696 DEBUG: Adding file type information (has MAIN ‘true’, has TEST ‘false’) for project ‘REDACTED.REDACTED.Api’ (project key ‘REDACTED:REDACTED:’, base dir ‘D:\a\1\s\Api’). For debug info, see ProjectInfo.xml in ‘D:\a\1.sonarqube\out\0’.
Line 811: 2022-01-21T15:12:32.5792947Z 15:12:32.576 INFO: Found 1 MSBuild C# project: 1 MAIN project.
I was able to reproduce the issue you were having regarding main branch summary not showing on the overall project dashboard. I’ve referred your issue to our SonarCloud dev team and I hope we provide you a reply soon.
The projects overview is displaying “The main branch of this project is empty.” because there are 0 Lines of Code being reported for your product. This is evident from the screenshot you shared earlier.
(Note that in SonarQube with SONAR-12678 with chose to use lines instead of ncloc as the determining factor for whether a project is empty or not, but let’s leave that to the side for now as it is not the root cause of your issue).
0 Lines of Code are being reported on your project because all the lines in your project are considered Test Code (which don’t count towards the Lines of Code metric, which only considers source/product code).
2022-01-27T16:15:41.3491943Z WARN: SonarScanner for .NET detected only TEST files and no MAIN files for C# in the current solution. Only TEST-code related results will be imported to your SonarQube/SonarCloud project. Many of our rules (e.g. vulnerabilities) are raised only on MAIN-code. Read more about how the SonarScanner for .NET detects test projects: Analysis of product projects vs. test projects · SonarSource/sonar-scanner-msbuild Wiki · GitHub
So we’re right back to the initial problem from your first post. What’s old is new.
Something I do not think we have looked at yet is the logging that’s available to describe why a project has been categorized a certain way.
I would suggest focusing on these logs (dotnet build -v:n) as described in the documentation)