I know you can do it file by file.
Is there any way to do this in one step for all files in a project?
Go to Tools > Options > Text Editor > C# > Code Style > Formatting. It has an experimental Format Document Settings where you can have Visual Studio clean up your code. Two of the options are to "Remove unnecessary usings" and "Sort usings". Check these two and you're good to go!
CTRL + K + E Will sort and remove your unused usings.
Shift + Alt + O will take care of you.
There is no need for any plugins in VS 2017 or 2019. Click the bulb icon near any using statement and click Solution
next to Fix all occurrences in
part.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With