ReSharper 8.0 Web Help

ReSharper | Options | Code Editing | Visual Basic .NET | Namespace Imports

This page contains options that affect the way ReSharper optimizes namespace import directives and resolves references to namespaces when applying quick-fixes or completing the code.

Item Description
Reference Qualification Options in this section define whether ReSharper should resolve references with namespace import directives or fully qualified names.
Insert import directives when necessary Click this radio button to create namespace import directives when referencing a type that has not been imported.
Allow the alias import directive Selecting this check box allows using aliases in namespace import directives, as opposed to fully qualified namespace names.
Use fully qualified names Click this radio button to add a fully qualified path to each unresolved reference.
Imports Optimization This section helps configure how ReSharper should handle namespace import directives when running code cleanup.
Do not remove import alias directives if alias name differs from the imported type name If this check box is selected, ReSharper never removes non-trivial alias import directives from the source code, even though they are redundant. If it is cleared, ReSharper removes all redundant import directives.
Namespaces that should not be removed

In this text 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 text 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.

Note

ReSharper's settings are saved in settings layers that enable you to have different settings for different solutions as well as to share your settings with your team. To learn more, study the Managing and Sharing Options section.

See Also

Procedures: