ReSharper 4.5: Remove Regions around Interface Members

I just upgraded to JetBrains ReSharper 4.5, a productivity tool I dearly love…,  ok, so you know when someone says that they are about to rip someone a new one ;-).  Well, I am not going to rip too bad.  I will just say I DO NOT like regions, used them when I was a boy, but now I am a man, ok, so you get the picture ;-).

So, here is the story I am working along writing a WCF Service for my current project, and run the Full Cleanup (Alt-Ctrl-Shift-F) and after it is done, I see these #region tags around the members that implement the interface.  I instantly start looking for how to turn that off. 

Here are the steps I took to do just that:

  • Go to ReSharper->Options
  • Navigate to Languages->C#->Type Members Layout
  • Uncheck Use Default Patterns (Don’t be scared, the Custom Patterns populates with a lot of XML, Don’t Panic!)
  • Scroll almost down to the bottom of the text, looking for <!—interface implementations –>
  • Delete the <Group>…</Group> tags

Now running the Cleanup does not add pesky regions around my interface members, I am going to have to spend more time in these setting because I have a feeling this is not the only place they have sneaked into.

Oh, if you delete that line and want to get it back, just check the Use Default Patterns and apply the settings, it will re-write the default settings.  I verified this on my install and it worked fine.


I spent a few more minutes today and just did a blanket remove of any of the <Group>…</Group> in the Type Members Layout and all is good.

blog comments powered by Disqus


<<  October 2021  >>

View posts in large calendar

Month List