Version of SonarQube:
Community Edition Version 7.6 (build 21501)
Version of Sonar-Scanner-MSBuild:
MSBuild.exe from Visual Studio 2017
Version of MSBuild:
Microsoft ® Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright © Microsoft Corporation. All rights reserved.
I am trying to analyze some large, complex C# projects. On one of them, I am running into errors like this:
File foo.cs can’t be indexed twice. Please check that inclusion/exclusion patterns produce disjoint sets for main and test files.
The project is structured with a SLN file in one directory, with each of the components in subdirectories under that. Each of the components has a CSPROJ file.
I have been trying various values of sonar.projectBaseDir, sonar.sources, and sonar.exclusions to resolve the issue, without success.
One thing I’m not clear on from the documentation–how do the sonar.projectBaseDir, sonar.sources, and sonar.exclusions values relate to each other? Is the value for sonar.sources relative to the value of sonar.projectBaseDir? Is the value for sonar.exclusions relative to sonar.sources? Are absolute paths permissible (or recommended) for any of them?
Thanks for your help.