diff --git a/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.Executor.cs b/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.Executor.cs index b3900eb3a11ab5724dbf476dc52d7925cc87f4e5..2d74b51e4f13122870b77e2a61f2d147503f9954 100644 --- a/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.Executor.cs +++ b/src/Features/Core/Portable/Diagnostics/EngineV2/DiagnosticIncrementalAnalyzer.Executor.cs @@ -309,7 +309,9 @@ public IEnumerable ConvertToLocalDiagnostics(Document targetDocu } // merge the result to existing one. - result = result.Add(analyzer, builder.ToResult()); + // there can be existing one from compiler driver with empty set. overwrite it with + // ide one. + result = result.SetItem(analyzer, builder.ToResult()); } return result;