How can I configure ReSharper's code cleanup on save?

前端 未结 8 1719
时光取名叫无心
时光取名叫无心 2020-12-08 13:56

I would love to configure Visual Studio/ReSharper to run \"Code cleanup\" whenever I save a file.

A bonus would be to configure this only for C# files, as I sometime

8条回答
  •  -上瘾入骨i
    2020-12-08 14:22

    It's my first post (hooray!) so excuse me if it's not perfect in any way...

    Question is about R#, but you also mentioned (Visual Studio/ReSharper), so maybe my hint will help somebody. In Visual Studio extension called "Productivity Power Tools" there are two options for this (In Tools -> Options -> Productivity Power Tools -> PowerCommands: General):

    1. Format code on save.
    2. Remove and Sort Usings on save.

    I find PPT nice to have, even with R# installed. You can get them from Visual Studio Gallery (2012 version, but there are also 2010, and 2013 versions).

提交回复
热议问题