When we run the Visual studio code analysis for “Microsoft all rules” in Visual Studio S2019, VS2017 we do not get any CA error codes listed in our project. But it lists only CS error codes ( Ex: CS0105, CS0108, CS0114 etc).
But when we run the same in console using below mentioned msbuild command, it lists several CA error codes in our project such as CA1002, CA1004, CA1006, CA1011 etc.
msbuild ABC.project1.csproj /p:RunCodeAnalysis=true /p:CodeAnalysisLogFile= ABC.project1.Report.MicrosftAllRules.xml
Basically, code analysis report is generated differently from Visual studio vs from the console. Please help why there is a different behavior here.