Sonarqube allows for individual files to be excluded from code coverage by adding patterns in the sonar.coverage.exclusions key. This can be done on a project level by
Some notion :
A .NET solution is Sonarqube's project. A .NET solutions's project is Sonarqube's project's module.
I find two solutions to exlcure Sonarqube's module (.NET project) from code coverage.
1) Configure exclusion from Web UI Sonarqube
From : SonarQube MSBuild Scanner doesn't exclude files from analysis
(Screenshot in French, but you get the idea)
2) Add the property "sonar.coverage.exclusions" in csproj
In your <.NET project>.csproj, add :
...
**
...
This two solutions work for me, but I would prefer a global setting for Sonarqube's project (.NET Solution).