ReSharper Web Help

ReSharper replaces fully qualified names with short names in C# and VB.NET code where possible by importing namespaces.

To shorten qualified references
  1. Choose ReSharper | Options | Code Editing | C# | Namespace Imports (for C# settings) or ReSharper | Options | Code Editing | Visual Basic .NET | Namespace Imports (for VB.NET settings).
  2. You can choose to use fully qualified names always or to use short names with namespace imports. In the Reference Qualification section click Insert using directives when necessary or Use fully qualified names. Moreover you can tune replacing, select or clear check boxes.
  3. Choose Code Editing | Code Cleanup in ReSharper Options dialog box.
  4. Create a new profile as described in Creating Custom Profiles . In the Selected profile settings section for the new profile select Shorten qualified references check box.
  5. Click OK to save the new profile and close the ReSharper Options dialog box.
  6. Open the Code Cleanup dialog box from the text editor or Solution Explorer as described in Running Code Cleanup .
  7. When the Code Cleanup dialog box opens, select the newly created profile in the Available Profiles area.
  8. Click Run to perform Code Cleanup. ReSharper will shorten qualified references.

See Also

Procedures