This is Regarding C# projects dotnet 6.0 net analyzers. How to use Microsoft.CodeAnalysis.NetAnalyzers from a command line, using msbuild and generate output file for code analysis result for complete solution containing multiple c# project. All error log of code analysis warnings result should be in single sarif or XML file.
command used is
MSBUILD "/property:Configuration=Debug;EnableNetAnalyzers=True;AnalysisMode=All;AnalysisLevel=Latest;RunAnalyzers=True;RunAnalyzersDuringBuild=True;ErrorLog=analysislog.sarif" "Solution_Name.sln"
But generates separate file for each project not single file
For Fxcop analyzers below works
msbuild SolutionName.sln /p:RunCodeAnalysis=true;CodeAnalysisLogFile=MyXmlReport.xml;CodeAnalysisDir='BuildOut\CodeAnalysis'
How to apply CodeAnalysisDir msbuild switch to new net analyzers