We recently upgraded SonarQube Developer Edition from 9.9.1 to 2025.1.1.5 and observed an issue with our .NET project analysis, where only the test project is being analyzed, while the main source projects (API, Business, Common, and DataAccess layers) are ignored. This behavior did not occur prior to the upgrade, and the same solution structure was analyzed correctly in version 9.9.1. We would like to understand whether there have been any changes in source vs test project detection for .NET in the newer version and what configuration checks or updates are recommended post-upgrade to ensure all source projects are included.
Deployed : zip
Hi @hari.ravindran, and welcome to the community!
Many, many things have changed between these versions, in the analyzer and in the scanner.
You will need to generate a verbose log (by adding /d:sonar.verbose=true to the scanner begin invocation) and post it here (redacted of course) before we can give any help.
Denis
Hi Denis
Thank you for replying. I have attached the above said verbose log. Thank you for your help in advance.
master based sonaranalyser pipeline logs.txt (2.7 MB)
PR based sonaranalyser pipeline logs 1.txt (904.9 KB)
Hi @hari.ravindran
Indeed, the logs show that no project was categorized as having MAIN code.
However, you are using a very old version of the AZDO extension and tasks (v5), leading to a very old version of the embedded scanner (v5.15.1).
May I suggest you upgrade your AZDO Extension for SonarQube to a more recent version as a first step? Today we are at v8.0.1, which is quite the gap (and will bring the scanner to a recent v11 version).
One thing to be aware of, the newer scanner default to indexing all files, even those outside the solution folder. If you have a separate frontend project in TypeScript, for example, simply running the new version of the task with no changes may analyze more files. If you do not want that behavior, you should pass a specific option sonar.scanner.scanAll=false in the extraProperties input. You must also make sure the scannerMode is set to dotnet, as the specific value for this input changed in more recent versions of the extension.
For example:
projectKey: XXXXX
scannerMode: dotnet
extraProperties:
sonar.scanner.scanAll=false
Let me know when you have upgraded if you still encounter problems.
Denis