Error in Run Code Analysis step in TFS?

I am using SonarQube version 7.4 and TFS build task Run Code Analysis version 4

So I am getting error in Run Code Analysis step
File can’t be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files

Below is my configuration for Prepare analysis on SonarQube step

sonar.verbose=true
sonar.sources=$(Build.SourcesDirectory)
sonar.inclusions=Code/**
sonar.cs.vstest.reportsPaths=/*.trx
sonar.cs.vscoveragexml.reportsPaths=
/*.coveragexml
sonar.cfamily.build-wrapper-output=$(Build.SourcesDirectory)
sonar.cfamily.threads=6
sonar.cfamily.cppunit.reportsPath=**/result.xml
sonar.branch.name=$(Build.SourceBranchName)
sonar.dependencyCheck.reportPath=$(Build.ArtifactStagingDirectory)\dependency-check-report.xml
sonar.dependencyCheck.htmlReportPath=$(Build.ArtifactStagingDirectory)\dependency-check-report.html

Also below is my project folder structure

Client
Code
Lib
Package
Research
Runners
Tools

I want to scan only Code folder only, Please help me.

Hi,

If you use the Scanner for MSBuild, then sonar.sources and inclusions are being deducted automatically.

If you want to add exclusions to that, i suggest you to read the documentation on narrowing down the focus, and then exclude all but Code folder that you want : https://sonarcloud.io/documentation/project-administration/narrowing-the-focus/