Scan with MSBuild 2022 Reports Fewer Code Smells Compared to Scan with MSBuild 15.0

SonarQube Version: 9.9 (build 65466)
sonar-scanner-msbuild version: 5.12.0.64969
SonarQube deployed on Linux VM

With the MSBuild being the only changing variable, a scan of my project returns about 5 times as many code smells when built with MSBuild 15.0 as compared to MSBuild 2022.

From looking at the logs, it seems that some rules are just omitted. In general, it seems that the rules omitted are the one having to do with a regex pattern for variable naming convention and so on. As an example, no results for rule vbnet:S2364 appear in the scan with MSBuild 2022, but I see many instances of that rule in the scan with MSBuild 15.0.

I’m certain that there is some helpful information that I could include, but have missed. Please let me know what information I can collect to help figure this issue out.

Hi,

I suspect it’s related to this:

Does that sound right?

 
Ann