Please add 'Remove and Sort Usings'
From vscode-dotnettools created by mmiller-d8: microsoft/vscode-dotnettools#982
Type: Feature Request
It would be really great if you had a 'Remove and Sort Usings' feature like in Visual Studio.
Extension version: 1.3.10 VS Code version: Code 1.87.0 (019f4d1419fbc8219a181fab7892ebccf7ee29a2, 2024-02-27T23:42:51.279Z) OS version: Darwin arm64 23.2.0 Modes:
At the very least it'd be good to see the built-in roslyn language server detect unused usings (CS8019). This is a pretty big gap compared to O#.
@jeremy-allocate If you are not seeing the Roslyn LSP report unused usings, please open a new issue and provide the requested logs and repro steps.
@JoeRobich should that be opened in this repo, or https://github.com/dotnet/roslyn, or https://github.com/dotnet/roslyn-analyzers?
Open it in this repo and we will transfer as necessary once we can repro.
Done, https://github.com/dotnet/vscode-csharp/issues/7416.
@arkalyanms I'd like to recommend an extension I currently maintain called C# Organize Usings. I forked csharp-format-usings, fixed all the bugs that were causing me issues with it, and just released support for the IDE0005 flavor of the warning that Roslyn uses (vs. CS8019). Hope you find it useful. I've configured it to run on save in combination with this extension, which has been working out great so far for my team.
If you try it, please let me know if you run into any problems that prevent you from using it.