Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Remove Unnecessary Imports for C#New to Visual Studio Code? Get it now.
Remove Unnecessary Imports for C#

Remove Unnecessary Imports for C#

Patrick Preston

|
21 installs
| (1) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Remove Unnecessary Imports for C#

Requires the OmniSharp (C#) extension to be installed!

Adds a code action to remove unnecessary imports from C# files. Simply add source.organizeImports to your editor.codeActionsOnSave like so:

{
    "editor.codeActionsOnSave": [
        "source.organizeImports"
    ]
}

and any unused using directives in C# files will be automatically removed upon saving.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft