Skip to main content

Remove Unused Assembly References

This feature enables you to remove the Assembly References you never used in your project.

How to Use

Right-click the required project in the Solution Explorer and choose Remove Unused References.

CodeStyle_RemoveUnusedMenu

CodeRush invokes the confirmation dialog with the found references. You can select which references to remove and use the Remove button to confirm your selection.

CodeStyle_RemoveUnusedDialog

Customization

You can configure the Remove Unused References feature in the IDE | Assembly References options page.

Options

The Remove Unused References feature excludes both assembly references copied locally and DevExpress assemblies from analysis. In some cases, references on assemblies in code are missing, but these assemblies are required for application deployment.

To include these assemblies in analysis:

  • Check the “Remove assembly references copied locally” item.
  • Remove the “DevExpress*” line from the “Never remove the following assembly references” text field.

Note

The usage (Imports) statements are not removed; use the Remove unused namespace references cleanup refactoring to remove unused imports in the entire project.