🛠️ Visual Studio: Fix the Live Unit Testing Icon Staying Gray on a Test Project Forever Because the Project Targets a Framework Live Unit Testing Doesn’t Support
Live Unit Testing runs your test suite continuously in the background and paints a green check or a red cross directly next to each covered line as you type. That instrumentation only works for projects built against a runtime Live Unit Testing actually supports — classic .NET Framework and most modern .NET SDK-style projects qualify, but a project still multi-targeting an old portable profile, a .NET Standard 1.x library, or certain UWP/Xamarin heads doesn’t. When one test project in a solution falls outside that support list, Visual Studio doesn’t show an error or a warning dialog explaining why — the gray dash icon just sits there next to every line in that project, indefinitely, making it look like Live Unit Testing silently died rather than that it never started for that specific project in the first place.
🔎 The Problem
Live Unit Testing status bar: "6,214 of 6,214 tests covered" ...but every line in Reporting.Legacy.Tests shows a plain gray dash, never red or green Output > Live Unit Testing pane: no errors, no warnings, no mention of Reporting.Legacy.Tests at all
✅ Fix: Make the Behavior Explicit and Tested
- Check Live Unit Testing’s own coverage summary (Test > Live Unit Testing > Live Unit Testing Options, or the status bar percentage) against your actual project list — a project it silently skipped just won’t appear in that count at all, which is the real tell, not the gray icons by themselves.
- Confirm every test project’s target framework is one Live Unit Testing documents as supported; retargeting a stray .NET Standard 1.x or old portable-profile test project to a current target framework moniker is usually the entire fix.
- If a project genuinely can’t be retargeted, exclude it explicitly from Live Unit Testing (right-click the project > Live Unit Testing > Stop Including) so its permanently-gray lines stop looking like a crash you need to keep investigating.
💡 Pro Tip
Live Unit Testing’s own coverage percentage in the status bar is the fastest health check — if it’s covering fewer tests than your solution actually has, something was excluded, gray icons or not.
🚨 Why This Is Dangerous
Assuming a gray-icon project is “probably fine” means you lose the one signal Live Unit Testing exists to give you — a regression in that project’s code can sit broken for days with every line still showing the same neutral gray it always has.
A dash isn’t a passing test — it’s Live Unit Testing telling you, as quietly as it possibly can, that it never got to look at this file at all.
