Description / Issue:
We are experiencing an issue where SonarQube 9.9 does not display Lines of Code (LOC) for our .NET Core 3.0 project. Instead of showing LOC, SonarQube displays a dash (–) for all C# files.
Only the Dockerfile LOC is detected and visible in the UI.
Environment Details:
| Component | Version / Info |
|---|---|
| SonarQube | 9.9 (LTS) |
| SonarScanner | 5.0.2.4997 |
| Java Runtime | Java 17 |
| .NET Version | .NET Core 3.0 |
| Build Tool | Azure DevOps Classic Pipeline |
| OS / Agent | Linux (Ubuntu 4.15.0-142 kernel) |
What We Have Already Tried (Troubleshooting Steps):
Verified and configured correct path for code coverage.
Created a new basic pipeline, but the issue persisted.
Performed a standalone analysis with SonarScanner CLI — still LOC shows as (–).
Updated multiple <PropertyGroup> configurations in .csproj, but no change.
Added sonar.sources property – briefly saw duplicate file warnings, but confirmed there are no duplicates.
Added correct include paths, but lines of code are still not detected.