dotnet / dotnet/roslyn

[Feedback] Remove unused references doesnt work

Open
#79,723 3 comments 0 reactions 0 assignees View on GitHub
Area-Compilers Developer Community Priority:1
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

[Link to AzDO feedback work item](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2451657).
[Link to Developer Community feedback item](https://developercommunity.visualstudio.com/t/Remove-unused-references-doesnt-work/10891804).
[severity:It’s more difficult to complete my work]
When we will RMB on project and select Remove unused references. VS will do analyses and show popup window that there are no references which should be removed (none used). However, when we will do same over some other tools e.g. R#, it will show there are lot of references in project which can be removed and when those are removed project still compiles correctly. Which mean R# can identify unused references with higher accuracy. This VS feature doesn’t work at all. Please see attached Unused References screenshot which shows output from VS feature and same R# feature running on same project. R# is correct and all listed references can be removed from given project.

To find diagnostic information, see the [original linked feedback ticket](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2451657).

Contributor guide

Open the contributing guide

Research direction

Start with the linked Azure DevOps feedback work item and Developer Community report, then reproduce the Remove unused references result in the affected project and compare it with ReSharper. Done means Visual Studio identifies the references reported as removable while the project still compiles after they are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.