# Project identification
sonar.projectKey=********
sonar.projectVersion=1.0
sonar.projectName=********
# Info required for Sonar
sonar.sources=.
sonar.language=cs
sonar.sourceEncoding=UTF-8
sonar.exclusions=**/obj/**,**/bin/**,**/*.dll
sonar.flex.cobertura.reportPaths=TestResults/**/coverage.cobertura.xml
sonar.cs.vstest.reportsPaths=TestResults/**/*.trx
Issues:
On main branch it states that “The main branch of this project is empty.”
On PRs, it does not find any issue/duplication/smell, which seems wierd.
Hi @Juan_Carrey1. Full disclaimer, I am currently working to set up SonarQube and then integrate it with Azure DevOps, but have not done so yet, so I do not have the experience of getting this flow working.
When I set up an empty YAML Pipeline in Azure DevOps and search for the SonarQube Prepare task, these are the options I am presented with:
So I think your scannerMode property should be set to MSBuild to run the SonarScanner for AzureDevOps. I am guessing when run in MSBuild mode, it is a wrapper around the SonarScanner for .NET. I bring that up to point out that SonarScanner for .NET does not have any documentation around a sonar-project.properties file, so I don’t think .NET projects use this file.
Update: yeah, @ganncamp just confirmed in another thread that sonar-project.properties are not used in .NET analysis:
I was able to make it work, by adding NET5 and NETCore2.0 SDKs so sonarcloud could use 2.0 for MSBuild scanner while at the same time building the project with net5