codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

do not remove unused using statements in vs2019

Open kerojiang opened this issue 7 years ago • 3 comments

Environment

  • Visual Studio version: 2019 Enterprise
  • CodeMaid version: 11.0.183
  • Code language: C#

Description

when I typed ctrl+s to save file,the unused using statements do not removed,but other cleaning is ok

Steps to recreate

  1. enable the auto clean when save
  2. type ctrl+s to save the file
  3. the unused using statements do not removed

kerojiang avatar Jul 10 '19 03:07 kerojiang

Thanks for reporting the issue. By default we do not remove using statements during auto cleanup, but you can change that at Extensions->CodeMaid->Options->Cleaning->Visual Studio->Run remove and sort using statements->Skip during automatic cleanup on save

The reason this is off by default is that sometimes users will run into infinite loops if they have other extensions installed with similar auto save functionality.

Hope it helps!

codecadwallader avatar Jul 11 '19 10:07 codecadwallader

Thank you indeed @kerojiang, found this by googling the issue and got it solved quickly 🙂 @codecadwallader a friendly reminder/suggestion: you might want to close the issue 🙂

MrPipa avatar Jan 05 '21 23:01 MrPipa

@MrPipa thanks for the feedback and glad you found the fix you needed. :)

re: closing the issue - I generally leave issues open and allow the author to decide if their question is answered.

codecadwallader avatar Jan 06 '21 14:01 codecadwallader