JetBrains Rider 2024.1 Help

Remove Unused References

This command allows cleaning up project and assembly references that have no actual usages in your source code. You can apply this command on a project, solution folder, or the entire solution. Before deletion is complete, you will be able to see all references that are going to be removed and if necessary, preserve the ones that you want to keep.

When you remove project and assembly references, JetBrains Rider also deletes all redundant namespace import directives (using in C#, Imports in Visual Basic) that reference namespaces from the removed assemblies.

Remove unused references

  1. In the Solution Explorer, select one or more projects, solution folders or the root node of the solution, or alternatively, select the Dependencies node of a project.

  2. Right-click the selection and choose Refactor This in the context menu or press Ctrl+Alt+Shift+T and then choose Remove Unused References

    The Remove Unused References dialog will open.

  3. All references that have no actual usages in the source code are displayed in a tree view . By default, all references are selected for deletion. If necessary, deselect references that you want to keep.

    JetBrains Rider: Removing unused references in the solution
  4. Click Next to remove the selected references.

Last modified: 11 February 2024