Skip to content
  • Home
  • About
  • No Access
  • Privacy Policy
Bits of .NET
Bits of .NET
  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy

Bits of .NET

Daily micro-tips for C#, SQL, performance, and scalable backend engineering.

  • Asp.Net Core
  • C#
  • SQL
  • JavaScript
  • CSS
  • About
  • ErcanOPAK.com
  • No Access
  • Privacy Policy
Visual Studio

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

- 12.11.26 - ErcanOPAK

🛠️ 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.

— Developer Tip

Related posts:

Visual Studio: Use Format Document to Auto-Indent Code

Visual Studio: Use Format Document to Auto-Indent Code

Visual Studio Slows Down After You Add Just One Project

Visual Studio Slows Down After You Add Just One Project

Visual Studio: Debug Like a Pro with Breakpoint Conditions

Visual Studio: Debug Like a Pro with Breakpoint Conditions

Views: 4

Post navigation

Git: Fix git clean -fd Deleting a File You Still Need Because It Matched .gitignore Before You Ever Added and Committed It
Git: Fix a git rebase -i Dropping a Commit You Never Deleted Because an Earlier ‘squash’ Line Silently Absorbed It Into the Commit Above

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

November 2026
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
30  
« Oct    

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (980)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (857)
  • How to select distinct rows in a datatable in C# (853)
  • How to enable, disable and check if Service Broker is enabled on a database in SQL Server (653)
  • Add Constraint to SQL Table to ensure email contains @ (608)
  • Average of all values in a column that are not zero in SQL (570)
  • How to use Map Mode for Vertical Scroll Mode in Visual Studio (546)
  • Find numbers with more than two decimal places in SQL (475)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit
  • SQL Server: Fix ROW_NUMBER Ties Reordering Between Identical Runs
  • C#: Fix an Enum HasFlag Returning True for the Zero Value
  • WordPress: Fix Featured Images Vanishing After a CDN Migration
  • Photoshop: Fix Content-Aware Fill Smearing a Repeating Pattern
  • Asp.Net Core: Fix Antiforgery Tokens Rejected Behind a Reverse Proxy

Most Viewed Posts

  • How to make theater mode the default for Youtube (1,055)
  • Get the User Name and Domain Name from an Email Address in SQL (980)
  • How to add default value for Entity Framework migrations for DateTime and Bool (977)
  • Get the First and Last Word from a String or Sentence in SQL (857)
  • How to select distinct rows in a datatable in C# (853)

Recent Posts

  • C#: Fix a ConditionalWeakTable Entry Vanishing Too Soon
  • Docker: Fix a Stale COPY Layer After Editing .dockerignore
  • Photoshop: Fix a Pattern Overlay Scaling Wrong on a High-DPI File
  • SQL Server: Fix a Computed Column Index Skipped by Implicit Cast
  • HTML5: Fix a required Input Inside a Hidden Tab Blocking Submit

Social

  • ErcanOPAK.com
  • GoodReads
  • LetterBoxD
  • Linkedin
  • The Blog
  • Twitter
© 2026 Bits of .NET | Built with Xblog Plus free WordPress theme by wpthemespace.com