Analysis property to select/remove projects within solution with Sonar Scanner for MSBUILD

Only to way to exclude projects when using SonarScanner Analysis is to put it in .xxproj file

<!-- in .csproj -->
  <!-- Exclude the project from analysis -->

But due to some restriction from our end users we cannot do this in the code. Also some of our partners do not like or allow to put this in the code.

It will be better if some option is provided in the SonarScanner begin or at the end phase to
exclude or skip projects through a file or comma seperated list of project files.

Also let me know if any option is there to exclude apart from mentioning in project file

Pramod Sharma

The normal mechanism for excluding files from analysis is to set the sonar.exclusions property.
See here for more info.

The <SonarQubeExclude> MSBuild property was an additional mechanism that was added to give users using the SonarScanner for MSBuild an alternative.