Sonarcloud analyzes only one of several projects

Hi,
I have a solution that contains several projects that should all be analyzed by Sonarcloud, but at the moment only one of the projects is recognized, even if all the code is present in Sonarcloud. How do I get it to analyze the other projects as well?
In Sonarcloud itself everything is on default settings, except for the long live branch pattern, which is extended by the develop branch.
The DevOps pipeline integrates Sonarcloud via the tasks “Prepare analysis on SonarCloud”, “Run Code Analysis” and “Publish Quality Gate Result”. All with the default settings and of course the project key from Sonarcloud. It uses integrate with MSBuild since these are .NET projects.


As you can see, only 91 lines of code are recognized, while the solution has more than 10,000 lines of code.

Thanks in advance
Talat

Hi @tea,

The fact that code smells are being reported against several projects shows that those projects are being analyzed, even if the “Lines of Code” metric is blank (e.g. Logic, NlpImprtDump, Test).

The “Lines of Code” metric is only reported for code that this categorized as product code i.e. non-test code. This wiki page explains the differences in how test and product code are treated, and describes how the SonarScanner for .NET decides whether a project is a test project or not.

Check the MSBuild logs to see if your projects are being categorized as you expect.