Version Used: 15.3 Preview 2.1
Steps to Reproduce:
Add the following code
using System;
using System.Threading;
class Class
{
System.Action _action = (Action)(() => { });
}
Expected Behavior:
System.Threading is indicated as an unused using directive, and the light bulb allows its removalSystem. qualification in System.Action is marked as unnecessary, and the light bulb allows the type to be simplified to ActionActual Behavior:
System.Action is not indicated as overly qualifiedNeither the light bulb nor the Remove and Sort Usings command may be used to make the desired corrections.
I suspect the "info" diagnostic for this gets filtered away in this case.
This is caused by the following:
It seems the fix is removing the dependence of warning level on severity. If a user configures a rule with a specific severity, the current warning level shouldn't undo that.
Assigned to Sam since he already has a PR for this.
If this was resolved in January, why am I still seeing this issue in June?
This happens to me with Visual studio 2019. The cause is the theme Blue High Constrast. Using other themes fix the issue.
change the theme to Blue not (blue high contrast), High Contrast will not grey out the unused namespace.
Most helpful comment
If this was resolved in January, why am I still seeing this issue in June?