Automatically import namespaces
Whenever you use a type from a namespace that hasn’t been added with a
statement, ReSharper will offer you
to add the corresponding statement on top of the file you’re in. This is indicated by a blue box shown above the
type being used. To add the corresponding reference, simply press
The above assumes that the project you’re in actually references the corresponding DLL. In case it does not,
ReSharper can still help you add both a DLL reference and a
statement provided the necessary DLL is referenced
by some other project in your solution and the project you’re in references that project.
If that happens to be the case, you won’t get a blue pop-up. Instead, the type being used will be highlighted in red, and ReSharper will offer you a quick-fix to add a reference to the corresponding assembly:
Selecting the top option will add a reference to
in your current project and will add a
statement at the top of the file.