ReSharper Help

Namespace Imports

ReSharper | Options | Code Editing | C# | Namespace Imports

This page contains options that affect the way ReSharper optimizes namespace import directives in existing codebase.

ReSharper also allows you to adjust a number of settings that affect the namespace import style. You can view and change these settings on the Code Editing | C# | Code Style options page.

ItemDescription
Do not remove using alias directives if alias name differs from the imported type name If this check box is selected, ReSharper never removes non-trivial alias using directives from the source code, even though they are redundant. If it is cleared, ReSharper removes all redundant using directives.
Namespaces that should not be removed

In this box, you can list namespaces that ReSharper will not highlight as redundant, and will not remove while running code cleanup.

Use the Add button to add an entry to the list and specify the namespace.

Use the Edit button to edit a namespace entry.

Use the Remove button to delete a selected entry from the list.

Namespaces that should be always imported

In this box, you can list namespaces that ReSharper should always import while running code cleanup.

Use the Add button to add an entry to the list and specify the namespace.

Use the Edit button to edit a namespace entry.

Use the Remove button to delete a selected entry from the list.

See Also

Last modified: 30 June 2015