Sonar-scanner-msbuild Not working inside Jenkins for .net 5

I have configured SonarQube Scanner and SonarScanner for MSBuild inside jenkins. Added the token from sonarcloud.

And here is my code behind Jenkins stage:

stage('SonarQube analysis') {
                    def scannerHome = tool 'sonarqube-msbuild';
                    sh "${scannerHome}/SonarScanner.MSBuild.dll begin /k:rushdigital_z-docker-base-image-updater /o:rushdigital"
                    sh 'MSBuild.dll /t:Rebuild'
                    sh "${scannerHome}/SonarScanner.MSBuild.dll end"

When I run the build, it throws the error like below:

Did I miss anything?

Do you have any documentation for the integration of .NET 5?

Hi @abuzaforfagun - welcome to the community.

If you are just scanning .NET code, you don’t need to install both the Scanner for .NET and the Scanner CLI. What happens if you remove the Scanner CLI?

This topic was automatically closed after 11 days. New replies are no longer allowed.