Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
356 views
in Technique[技术] by (71.8m points)

In Visual Studio 2019 how can I remove unused usings on format document?

In Visual Studio 2019 how can I remove unused usings on format document?

I have found instructions for previous versions of Visual Studio (Go to Tools > Options > Text Editor > C# > Code Style > Formatting.). I don't see that in Visual Studio 2019.

question from:https://stackoverflow.com/questions/55615136/in-visual-studio-2019-how-can-i-remove-unused-usings-on-format-document

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In Visual Studio 2019 you can remove unused usings with the Code Cleanup command:

enter image description here

enter image description here

And running code cleanup also formats the document.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...