Remove unused references

后端 未结 6 1562
你的背包
你的背包 2021-01-01 10:50

I want to know if any tool exists for removing unused references (not unused using directives) within a .NET C# project.

相关标签:
6条回答
  • 2021-01-01 11:05

    Resharper will certainly do the trick...

    0 讨论(0)
  • 2021-01-01 11:07

    JetBrains Resharper adds a menu item Remove Unused References to the References node's context menu in the Solution Explorer.

    When you click it, it'll scan you project and list references which can be removed. You can further select which ones you want to remove.

    0 讨论(0)
  • 2021-01-01 11:15

    Resharper has that option.

    0 讨论(0)
  • 2021-01-01 11:16

    ResolveUR - Resolve Unused Referencese Unused References

    https://marketplace.visualstudio.com/items?itemName=battas.ResolveUR-ResolveUnusedReferences

    Works with Visual Studio 2013, 2015, 2017 and 2019

    0 讨论(0)
  • 2021-01-01 11:22

    I am unaware of such a tool off the top of my head - I do know that Visual Studio does not include one by default. However, referenced assemblies that are not actually used by code in the project are automatically removed by the C# compiler from the list of assemblies referenced by the compiled program. If you use Reflector, you can compare the list of actual references to the list of references in the project, and remove the unnecessary ones that the project includes based on that.

    0 讨论(0)
  • 2021-01-01 11:25

    Check out the Productivity Power-tool Plugin

    Removing unused references from project is one of the many helpful features it has. It is free and it has some of the R# features.

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