How to specify file in dotnet scanner command

I am using dotnet-sonarscanner --version 4.8.0 and Sonarqube version 7.94 LTS. Can you please suggest how can I use file in dotnet scanner command.

sh “”" dotnet sonarscanner begin -k:“sonarqubeABC” “”"
sh “dotnet build {workspace}/{solutionfile}”
sh “”" dotnet sonarscanner end -d:sonar.login=“secrect-text” “”"


Welcome to the community!

The docs should help.


The “SonarScanner for .NET” page does not refer to a file. There is some documentation about this file in the base SonarScanner page.

Is a file not needed/used when using the SonarScanner for .NET? Could I set up a file and configure the SonarScanner for .NET to consume it?

Hi @ahaleiii,

Correct. It is not needed. The values read from that file in other contexts are read from the project in a .NET context.

No. If you really need to override / add to the properties the .NET analysis picks up automatically, the command line is easiest.


1 Like