Namespace Imports
Last modified: 21 July 2022ReSharper | 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# | Syntax Style page of ReSharper options (Alt+R, O).
Do not remove using alias directives if alias name differs from the imported type name | If this checkbox 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 | ReSharper will not report usings of these namespaces as redundant, and will not remove them while running code cleanup. |
Namespaces that should be always imported | ReSharper will always add usings for these namespaces while running code cleanup. |
Namespaces that should never ber removed from fully qualified type names | ReSharper will not report these namespaces in fully qualified type references as redundant, and will not remove them while running code cleanup. |
note
ReSharper's settings are saved in settings layers, which allow you to have different settings for different solutions and to share your settings with your team.