Is 'Optimize References' useful or will it create problems?

MG Bhadurudeen 626 Reputation points
2020-06-17T18:56:32.7+00:00

Hello, When I run ReSharper's "Optimize References" menu command, it lists some references, it says they can be removed. But I suspect whether removing these references would affect the proper functioning of the app. Is there any benefit in removing these unused references?
Also, I want to know, whether the "Create App Packages" command of visual studio removes these unused references for me while creating the packages.

10256-mayiremove.png

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

Accepted answer
  1. Roy Li - MSFT 31,826 Reputation points Microsoft Vendor
    2020-06-18T03:14:56.357+00:00

    Hello,

    Welcome to Microsoft Q&A!

    But I suspect whether removing these references would affect the proper functioning of the app. Is there any benefit in removing these unused references?

    Generally speaking, no , there is no big effect if you removing these unused references. The runtime won't load a referenced assembly until it is actually needed. But you could make a try if you would like to. Please remember to keep a backup before you clean the references.

    whether the "Create App Packages" command of visual studio removes these unused references for me while creating the packages.

    No, it won't.

    Thank you.

    0 comments No comments

0 additional answers

Sort by: Most helpful