🛠️ Fix Quick Actions Hiding Behind a Stale Squiggle
The lightbulb/screwdriver Quick Actions menu (Ctrl+.) is bound to a specific diagnostic snapshot, not to whatever squiggle is currently drawn on screen. When Visual Studio’s background analysis enters its “Suspended” state — shown as a small icon in the status bar during a large solution load, a NuGet restore, or a CPU spike — the editor keeps displaying the LAST squiggle it drew, but the Quick Actions bound to it are now stale: invoking one either does nothing, or silently re-applies a fix that’s already been applied, while analysis sits paused until you notice and resume it yourself.
🔎 The Problem
Status bar: "Code analysis is paused" (small icon, bottom of the VS window) Editor: old squiggle still visible under a line that was already fixed Ctrl+. on that line: menu opens but the listed fix either no-ops or re-applies a change that's already in the file, because it's bound to the suspended analysis pass's snapshot, not a fresh one.
âś… Fix: Resume Analysis Before Trusting the Squiggle
- Click the small code-analysis status icon in the bottom status bar; if it reads Paused/Suspended, choose Resume instead of waiting for Visual Studio to resume it on its own, which can take far longer under real CPU or memory pressure.
- Force Roslyn to recompute that one file’s diagnostics by making a trivial whitespace edit and undoing it (Ctrl+Z) — this invalidates the cached snapshot without needing a full solution reload.
- If it keeps happening on the same file, close and reopen just that document instead of the whole solution; this disposes only that file’s cached syntax/semantic model rather than every open document’s.
🚨 Why This Is Dangerous
- Treating a lightbulb-free squiggle as “already fixed” can let a real diagnostic ship untouched — the code looks clean in the editor purely because analysis hasn’t gotten around to re-flagging it yet, and the build or CI analyzer pass will still catch it later, just not where you were looking.
A lightbulb that won’t act and a squiggle that won’t clear are both telling you the same thing: analysis isn’t actually looking at this line right now.
