dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.83k stars 4k forks source link

Unused imports reported during merge conflict resolution #73641

Open vsfeedback opened 2 months ago

vsfeedback commented 2 months ago

This issue has been moved from a ticket on Developer Community.


[severity:It bothers me. A fix would be nice] Possibly related to this report.

Visual Studio has detected several unused usings and when told to clean them up it removes zero of them. When removed manually it turns out that (shocked-pikachu.jpg) they are actually in use.


Original Comments

Feedback Bot on 5/16/2024, 01:01 AM:

(private comment, text removed)

Tianyu Sun [MSFT] on 5/16/2024, 08:42 AM:

(private comment, text removed)

Major Johnson on 5/16/2024, 11:19 AM:

(private comment, text removed)

Feedback Bot on 5/16/2024, 05:38 PM:

(private comment, text removed)


Original Solutions

(no solutions)

sharwell commented 2 months ago

User observed that during merge conflict resolution in the IDE (when errors were present), one or more using directives were faded as though they were unnecessary, even though removing them would result in additional compilation errors.

Draco18s commented 2 months ago

Adding the original user (me) to this issue and adding a screencap of the issue in action. This was taken before I was aware of the compilation errors from the merge conflict (I had just removed an import that was no longer valid, saw the "unused" imports and thought "whut? those are totally in use").

unused

genlu commented 2 months ago

@sharwell we get those diagnostics from compiler, right?