ReSharper Web Help

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

This tab contains options that affect the way ReSharper optimizes namespace import directives and resolves references to namespaces when 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 using directives when necessary

Click this radio button to create namespace import directives when referencing a type that has not been imported.

Allow the alias using 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 it's optimizing code.

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 using 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 optimizing code.

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 always be imported

In this text box, you can list namespaces that ReSharper should always import while optimizing code by inserting corresponding directives.

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

Procedures