Sonar standalone scanner not scanning c# code

Hi @Indigo744,

The Scanner for MSBuild (“S4MSB”) does quite a bit of extra work before calling the command line scanner. The C#/VB.NET rules are implemented as Roslyn analyzers so they are not executed by the command line scanner - they are executed by the C#/VB.NET compiler as part of the MSBuild step. The S4MSB generates a ruleset corresponding to the selected Quality Profile, integrates the SonarC/VB.Net rules into the build, and collects information about the files to be analyzed, before finally generating a sonar-project.properties file and calling the command line scanner. Of course, you don’t have to use the S4MSB - you can handle all of those steps yourself if you want to.

If those files are referenced by an MSBuild project (e.g. in an ASP.NET project) then they will automatically be picked up the S4MSB and passed to the command line scanner to be analysed.
See the thread Typescript files are not analyzed with Scanner for MSBuild for more information and alternatives.