I've got a Roslyn based Code Analyzer and Codefix. When directly creating the ReportDiagnostic from an AnalyzerCodeBlock, they would show up in live analysis (Problems in Jetbrains Rider).
However, it needs to parse additional data from the solution to build a dependency tree to make the decision. So now it works like this:
RegisterCompilationStartAction -> then it registers a RegisterCodeBlockStartAction to build a dependency tree
RegisterOperationAction -> Instead of generating the ReportDiagnostic directly, it puts the particular calls into a ConcurrentBag to analyze later.
RegisterCompilationEndAction -> When called, this analyzes the calls from RegisterOperationAction with the dependency tree generated in the RegisterCodeBlockStartAction and generates ReportDiagnostics with the combined information.
Now it only works on build, not in live analysis. I would love to get this back working in live analysis (I have enable solution-wide analysis enabled) since allowing use of the codefixes are incredibly useful.
Any idea of a known reason (like using any CompilationStart-End) this automatically doesn't work in live mode, or is there a way to refactor this into a different structure compatible with live analysis?