Removing all unused references from a project in Visual Studio projects

前端 未结 14 2025
北荒
北荒 2020-11-29 16:41

I just wondered if it possible within various Visual Studio versions to automatically remove all references from a project that were never been used?

In your answer,

相关标签:
14条回答
  • 2020-11-29 17:32

    In VB2008, it works this way:

    Project>Add References
    

    Then click on the Recent tab where you can see list of references used recently. Locate the one you do not want and delet it. Then you close without adding anything.

    0 讨论(0)
  • 2020-11-29 17:34

    The Resharper extension will do this for you.

    This extension supports Visual Studio 2005 through 2017.

    While the compiler won't include unused assemblies, extraneous using statements and references slows down Visual Studio and Intellisense, since there's more code the tools have to consider.

    0 讨论(0)
提交回复
热议问题