Sonarqube for .Net application

Hi team

I am using SonarQube 9.9 LTS and I am trying to analysis .Net(c#) project. After saucerful analysis sonarqube is not analyzing .cs files.

I am using below configuration.

# must be unique in a given SonarQube instance
sonar.projectKey="FileTransferService-04.00.00"
sonar.projectName="FileTransferService-04.00.00_Build"
sonar.projectVersion=%REPORT_VERSION%
sonar.sources=%WORKSPACE%/SSTR/FileTransferService/FileTransferService
sonar.inclusions=**/*.cs
sonar.dotnet.key=netcoreapp
sonar.projectBaseDir=%WORKSPACE%/SSTR/FileTransferService/FileTransferService

Please find the logs below. Please let me know if i need to do some changes in configuration

k

Hi,

For .NET projects, you need to use SonarScanner for .NET.

 
HTH,
Ann

Hi Ann

I am using the same sonar scanner for .net

Hi,

Please provide your full analysis log.

Share the Scanner for .NET verbose logs

  • Add /d:"sonar.verbose=true" to the…
    • SonarScanner.MSBuild.exe or dotnet sonarscanner begin command to get more detailed logs
      • For example: SonarScanner.MSBuild.exe begin /k:"MyProject" /d:"sonar.verbose=true"
    • “SonarQubePrepare” or “SonarCloudPrepare” task’s extraProperties argument if you are using Azure DevOps
      • For example:
        - task: SonarCloudPrepare@1
            inputs:
              SonarCloud: 'sonarcloud'
              organization: 'foo'
              scannerMode: 'MSBuild'
              projectKey: 'foo_sonar-scanning-someconsoleapp'
              projectName: 'sonar-scanning-someconsoleapp'
              extraProperties: |
                sonar.verbose=true
        
  • The important logs are in the END step (i.e. SonarQubeAnalyze / SonarCloudAnalyze / “Run Code Analysis”)

Share the msbuild detailed logs

MsBuild.exe /t:Rebuild /v:d

or

dotnet build -v:d

 
Thx,
Ann