question

MGBhadurudeen-1345 avatar image
0 Votes"
MGBhadurudeen-1345 asked RoyLi-MSFT answered

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

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


windows-uwp
mayiremove.png (64.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
0 Votes"
RoyLi-MSFT answered

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.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.