ReSharper 2024.3 Help

Automatically import namespaces

Whenever you use a type from a namespace that hasn't been added with a using 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, press Alt+Enter.

ReSharper helps add missing using statement

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 using 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 popup. 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:

ReSharper helps add missing using statement and assembly reference

Selecting the top option will add a reference to System.Windows.Forms in your current project and will add a using System.Windows.Forms; statement at the top of the file.

Last modified: 25 September 2024