Sonar not analyze C# code

We are using Sonarqube developer edition 8.9.7, sonar-scanner-msbuild-, TargetFrameworkVersion = v4.6.2, Toolversion = 14.0. When we try to analyze C# code, Sonarqube found .cs file and indexed into FilesToAnalyze.txt. It showed our .cs codes on project onto web gui. I assume our configuration is fine but it cannot anaylze .cs code. In addition, project has approximately 200k lines of code. Report include ~150 code smell 0 bug 0 vulnerability. All code smells related with .xml files.
Is there any idea why is happening or is there anybody encountered like this case.

Thanks in advance

Hey there.

This sounds like an issue of detecting test vs. product projects. Take a look at this documentation. Analysis of product projects vs. test projects · SonarSource/sonar-scanner-msbuild Wiki · GitHub

Hi @Colin,

How are you? Could you please give us a spesific answer? Already we have a lot of documents on the internet. We read all. But we couldnt resolve the issue…cs files are not analysed. As you see below screenshot, cs files LOCs are not counted.

Thank you for your support,
Kind regards,

Hi @Mehmet_Inan,

The most likely explanation is that your projects are being treated as test code rather than product code. The page @Colin referred you to explains how to check this, specifically this section.

Are your projects being correctly categorised?

Hi Duncan,

We categorised but still same problem. But when you have a free time we can have a quick meeting.

Thank you,

Hey there.

This community doesn’t offer that kind of support.

Can you share the logs showing the projects are correctly categorized?