Sonarqube not working for C# code

We are using dockerized Sonarqube 7.0 and sebp/sonnar-runner
While scanning the C# index files it is not getting analyzed

Sonar.properies:
sonar.projectKey=Project_key
sonar.projectName=Project_name
sonar.projectVersion=1.0
sonar.language=cs
sonar.sources=source
sonar.sourceEncoding=UTF-8

Results we are getting below,
05:02:02.298 INFO - 239 files indexed
05:02:02.305 INFO - Quality profile for cs: Sonar way
05:02:03.598 INFO - Sensor C# Properties [csharp]
05:02:03.598 WARN - Property missing: ‘sonar.cs.analyzer.projectOutPaths’. No protobuf files will be loaded for this project.
05:02:03.599 WARN - No roslyn issues report not found for this project.
05:02:03.599 INFO - Sensor C# Properties [csharp] (done) | time=1ms
05:02:03.599 INFO - Sensor SonarJavaXmlFileSensor [java]
05:02:03.604 INFO - Sensor SonarJavaXmlFileSensor [java] (done) | time=5ms
05:02:03.604 INFO - Sensor C# [csharp]
05:02:03.605 INFO - Sensor C# [csharp] (done) | time=1ms
05:02:03.605 INFO - Sensor Zero Coverage Sensor
05:02:03.746 INFO - Sensor Zero Coverage Sensor (done) | time=141ms
05:02:03.746 INFO - Sensor CPD Block Indexer
05:02:03.746 INFO - Sensor CPD Block Indexer (done) | time=0ms
05:02:03.747 INFO - No SCM system was detected. You can use the ‘sonar.scm.provider’ property to explicitly specify it.
05:02:03.748 INFO - Calculating CPD for 0 files
05:02:03.749 INFO - CPD calculation finished
05:02:04.290 INFO - Analysis report generated in 509ms, dir size=589 KB
05:02:04.502 INFO - Analysis reports compressed in 212ms, zip size=257 KB
05:02:04.573 INFO - Analysis report uploaded in 71ms
05:02:04.575 INFO - ANALYSIS SUCCESSFUL, you can browse http://sonarqube:9000/path

Sonnar runner:
docker run --link sonarqube:sonarqube
–entrypoint /opt/sonar-runner-2.4/bin/sonar-runner
-e SONAR_USER_HOME=/data/.sonar-cache
-v pwd:/data -u id -u sebp/sonar-runner
-Dsonar.host.url=http://sonarqube:9000
-Dsonar.jdbc.url=jdbc:h2:tcp://sonarqube/sonar
-Dsonar.jdbc.username=sonar
-Dsonar.jdbc.password=sonar
-Dsonar.jdbc.driverClassName=org.h2.Driver
-Dsonar.embeddedDatabase.port=9092

We are getting “WARN - Property missing: ‘sonar.cs.analyzer.projectOutPaths’. No protobuf files will be loaded for this project” and no indexed files got analyzed.

Hi,

Your version is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.0 → 7.9.6 → 8.9.9 → 9.6 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us. Take note that in general, to analyze C# code, you must use the Scanner for .NET.

Thanks for the suggestion we will check and upgrade

1 Like