Jenkins SonarQube integration for c# code - SonarQube

Hello,

I’m looking to scan a static C# code either with Jenkins integration or Gitlab yml file. On the gitlab-runner I have dotnet-sdk-5.0 and sonarscanner-msbuild-5.2.1 in the /opt and the path has been added. On Jenkins which also has a sonarscanner with msbuild-5.2.1 and dotnet-sdk-5.0. Jenkins global config has the path to msbuild /opt/msbuild as well as dotnet-sdk-5.0 /opt/msbuild. Current error I’m getting is cannot execute binary file /opt/msbuild/SonarScanner.MSBuild.exe. Gitlab error say, your project contains a C# files which cannot be analyzed with the scanner you’re using. Please advise if i’m missing anything or which integration is quicker to troubleshoot.

Hi,

Welcome to the community!

You’re probably going to have a far easier time with Jenkins. The docs should help.

 
Ann