2 Replies Last post: Dec 15, 2011 12:35 PM by Andrey Serebryansky  
Matt Holmes Newbie 3 posts since
May 19, 2011
Currently Being Moderated

Dec 14, 2011 3:09 AM

ReSharper 6.0 - Optimize Using's and extension methods

We are using ReSharper 6.0.2202.688 here at work, and we ran in to a strange issue with code clean-up. If you run Code Cleanup with 'Optimize 'using' directives' enabled, ReSharper changes extension method calls to static calls. I looked in the C# Namespace Import options and saw nothing about extension methods. Supposedly 'Remove code redundancies' is supposed to actually do the oppisite of this (change static calls to extensions when available), but it seems to get over-ridden by 'Optimize 'using' directions',

 

Is there any way to change this behavior, or is this a bug in 6.0?

Mark Warpool Newbie 37 posts since
Aug 5, 2011
Currently Being Moderated
Dec 14, 2011 7:22 PM in response to: Matt Holmes
Re: ReSharper 6.0 - Optimize Using's and extension methods

I've noticed the same thing when doing refactor->move operations (which I think do an implicit code clean up).  I wasn't sure if it was something I did, or if it was a "bug".

Andrey Serebryansky JetBrains 2,900 posts since
Jan 12, 2005
Currently Being Moderated
Dec 15, 2011 12:35 PM in response to: Matt Holmes
Re: ReSharper 6.0 - Optimize Using's and extension methods

Hello Matt

     We've fixed several similar problems since ReSharper 6.0 release. Could you please first install the latest build of ReSharper 6.1 from http://confluence.jetbrains.net/display/ReSharper/ReSharper+6.1+Nightly+Builds and check if this still happens for you? Thank you!

 

Andrey Serebryansky

Senior Support Engineer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

More Like This

  • Retrieving data ...