Remove unused namespaces across a whole project or solution at once

前端 未结 10 1934
夕颜
夕颜 2020-12-25 09:46

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?

10条回答
  •  [愿得一人]
    2020-12-25 09:53

    Productivity Power tools is what you need. https://visualstudiogallery.msdn.microsoft.com/dbcb8670-889e-4a54-a226-a48a15e4cace

    Once you have that installed, you can find the “Remove and Sort Usings on Save” from the “Tools –> Options –> Productivity Power Tools –> PowerCommands –> Generals”. After you check that option, restart VS. Now save and you see the magic.

    For VS 2015, take a look at this

提交回复
热议问题