ReSharper Web Help

ReSharper | Find | Optimize References,

In order to use a component in your project, you should add a reference to the appropriate assembly. But what if there are too many references and some of them are no longer required? Of course, you can select a reference, find code that depends on it, and remove the reference, if there is no such code. And you have to repeat this action as many times as many references your project has. To simplify this task, ReSharper provides a new feature - Optimize References.

To optimize references
  1. Select a solution, a project or a References node in Solution Explorer.
  2. Do one of the following:
    • Choose ReSharper | Find | Optimize References.
    • Right-click the project, and then click Optimize References.
    • Press Ctrl+Alt+Y.

All found references are displayed in the Analyze references window.

You can look through unused references and either remove all of them by clicking Remove All Unused References or remove only selected ones by clicking Remove Selected References.

 Note

All projects contain an implied reference to mscorlib. In Visual Studio 2010, all projects contain an implied reference to System.Core, even if System.Core is removed from the list of references.

See Also

Procedures

Reference