I want to scan the C# file in the sonarqube for which I am using jenkins , for python I have already setup the same but it was done through “execute sonarscanner” and for C# I have to use “execute sonarscanner for MSbuild”.
Can anyone what are the steps I need to do . I have also tried to some setting but got failed.
Based on your second screenshot, your project uses non-UTF-8 characters? If so, you need to provide (probably in Additional arguments) sonar.sourceEncoding
I got the same result . I wrote sonar.sourceEncoding in the additional argument as well as I also tried the same by writing sonar.sourceEncoding=UTF-8 got the same result .
From you logs, it seems you are running on a Linux slave, but you have selected a Scanner for MSBuild for .NET 4.6. This is AFAIK not compatible.
You should probably select a Scanner for MSBuild for .NET Core.
The command would then look like: dotnet /path/to/SonarScanner.MSBuild.dll /k:xxx xxxx