diff --git a/src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.RegularCompilationTracker.cs b/src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.RegularCompilationTracker.cs index e2917700d9427..3943b8ce6beba 100644 --- a/src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.RegularCompilationTracker.cs +++ b/src/Workspaces/Core/Portable/Workspace/Solution/SolutionCompilationState.RegularCompilationTracker.cs @@ -872,7 +872,7 @@ public async ValueTask> GetSourceGeneratorDiagnostics foreach (var result in driverRunResult.Results) { - if (!IsGeneratorRunResultToIgnore(result)) + if (!result.Diagnostics.IsDefaultOrEmpty && !IsGeneratorRunResultToIgnore(result)) { builder.AddRange(result.Diagnostics); }