.NET scanning in sonar-scanner for kubernetes

Hello everyone.

Quick question because I am a little lost.
So I installed SonarQube 9.4 a few months ago using Ansible and a Helm chart in a Kubernetes cluster. I also have a few working Angular projects set-up with Github Actions that automatically run SonarQube.

Now I tried to add a .NET project and it tells me that I need to install .NET framework into the machine. How in the world am I going to do this? This is not something I find properties for in the Helm chart values
If I understand correctly the .NET framework needs to be installed in the docker container right?

This is the line that gave me the message:

WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html

Thanks in advance!

Ferre Vekemans

Hi Ferre,

Welcome to the community!

I’m a bit confused myself. If you want to analyze .NET code, then you need the .NET framework on the build agent. This shouldn’t have anything to do with your SonarQube instance. Analysis should be taking place in your build pipeline, which should be separate from your SonarQube server.


Yeah, I figured it out already. :smile:
I was confused with the documentation but it was indeed the sonar-scanner and not the server that needed to be changed. The solution was to use some extra dependencies in the GitHub actions pipeline.


1 Like