Define the following mandatory properties for 'Unknown': sonar.projectKey

I’m getting below error. while running the build pipeline for sonarQube in AzureDevOps.
Note : I’m using the private portal for sonarQube server URL.

##[error]ERROR: Error during SonarScanner execution

ERROR: You must define the following mandatory properties for ‘Unknown’: sonar.projectKey

ERROR:

ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

created sonar-project.properties file in github with following details.
sonar-scanner
-Dsonar.projectKey=verso-sor-lakehouse-demo
-Dsonar.sources=.
-Dsonar.host.url=https://xxxxxxxxxxxxx.com
-Dsonar.login=xxxxxxxxxxxxxxxxxxxxxxxxxxx
-Dsonar.verbose=true

Hi,

Welcome to the community!

I believe these values need to be set in your YAML file. The docs should help.

 
Ann