"Remove Unused References" unavailable for UWP projects

Hong 1,206 Reputation points
2024-05-30T23:35:05.0633333+00:00

I have enabled "Remove Unused References" but the context menu of a UWP app project does not have the option:

User's image

User's image

Could anyone shed some light on this?

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 16,391 Reputation points Microsoft Vendor
    2024-05-31T03:01:22.2966667+00:00

    Hi @Hong ,

    Welcome to Microsoft Q&A!

    According to the document Remove Unused References,

    This refactoring applies to:

    • C#
    • Visual Basic What: For SDK style projects only, lets you remove unused references. When: You want to clean up project references and NuGet packages that have no usage.

    UWP project is not SDK style project, it cannot use "Remove Unused References".

    Thank you.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful