Exclusions in a multi-module C# project

This is the current way to exclude .NET projects from the analysis.

To give some explanation: how our analysis currently works is that the Roslyn analyzers run during the build, and the results are then filtered during the END step based on the exclusions patterns.

To exclude the projects from the analysis (to avoid the performance overhead of running Roslyn analysis during compilation), you need to add the <SonarQubeExclude>true</SonarQubeExclude> in the {cs,vb}proj to exclude (like mentioned in the docs).

that was never in question that this would work. the problem is that the SonarExclusions as defined on your website are applied to every CSPROJ in the solution and that doesn’t seem right. I would want to enter relative paths relative to the root of the repo or solution. But if i say exclude “Utilities”, it excludes the Utilities folder in every single CSPROJ in the solution. That just doesn’t seem correct to me.

Hello @Michael_Foster

Sorry for the late reply.
Currently that is how the exclusions work. So, the way you did it is the correct one.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.