message “The main branch of this project is empty.” is displayed instead of the 6 ratings available (Security, Reliability, Maintainability…)
Go to the My projects page
Our project manager has noticed that the ratings for half of our projects have been replaced with the message “The main branch of this project is empty.” he wants them back. We did have them, but I was unable to work out when they disappeared. We have other projects that don’t appear to be affected as they still show these ratings.
I have tried to run the builds for the master branch and a PR build for the projects in question but the message remains unchanged. I have had a change request for one of the projects, Everything went through the process and that didn’t update that project display.
I have looked at some of the other threads that reference this message, but they all seem a little different from what we are experiencing.
Do you have any analysis warnings on these projects? What shows up in the Administration → Background Tasks for these projects? Were all analysis reports processed successfully?
The last time this project was built that completed without warning was 24th October 2024. The next time it runs/builds is 13th November, Not sure why it was triggered for build yet (I am still trying to find changes for this project between these dates) but this is when we start getting the warning.If that helps any…
In fact, the “empty” message you’re seeing is based not on the project being entirely empty, but on the presence/absence of a sentinel metric: lines of code.
I have had a quick look at the log, I have noticed that it is saying that files that are definitely part of the app are test files. “App_Start/BundleConfig.cs” is not a test file. I don’t understand a lot of it, I hope it helps.
The primary project name is SiteSurvey which is the Web Application.
What changed between these two dates? Was it perhaps analysis configuration?
A search of the log shows 31 hits for “baseDir”, which is… a lot. Are you setting this explicitly in your project files? Because there are a whole lot of lines like this:
2025-02-20T09:27:54.6160755Z 09:27:54.574 WARNING: File 'D:\a\1\s\Common\Aes.Services\BaseEntityService.cs' is not located under the base directory 'D:\a\1\s\Apps\SiteSurvey\Main' and will not be analyzed.