- Open the Imports panel.
- In the Enter or Select namespace field, start typing the namespace that interest you. Note that suggestions are provided while you type, in case you are not exactly sure what you are looking for.
- (Optional) Click the drop-down arrow to view and browse all available namespaces.
- Select the desired namespace. The namespace is added to the Imported Namespaces list.
Whenever you install a new dependency to your project, either a
.nupkg file from Manage Packages default feeds, or a custom library that you've created, the namespace can be imported from the Project panel as well.
Simply right-click the dependency in the tree, and select Import Namespaces. The namespaces are automatically added to your project, you can check them in the Imports panel.
To remove a namespace, select it in the Imports panel, and press Delete. To remove all unused namespace, right-click anywhere in the panel, and select Delete Unused.
Note that namespaces can only be removed if they aren't used. For example, you can remove a namespace from the project if the assembly that contains it is no longer referenced by the project.
Updated 4 months ago