Refactor menus greyed out

My refactoring menus are grayed out, only showing "rename". All other features in Resharper appear to work.

Interestingly, some refactorings show up on right click of class view( But not inline method)  And more oddly, if I open it in object browser, I can get "inline method" to show.  Sometimes "Extract method and Introduce variable" will show on right click in source code.

In 4.5/VS2008, I routinely could right click on a method name and say "inline"

- Visual Studio 2010 RTM
- Resharper 5.0 personal full edition (C# + VB)
- Windows Server 2000

I tried this :  but I couldn't install that version of MSXML, so I ran the "Update for Microsoft XML Core Services 4.0 Service Pack 3 (KB973685)"

No help there.

I also tried clearing the Resharper caches, Resetting the short cuts.  No help there.

So I uninstalled 5.0 and 4.5 and re-installed Version:5.0 Build: 1659.

Still no improvement.  I'm out of ideas.



My refactoring menus are grayed out, only showing "rename". All other
features in Resharper appear to work.

Does the "Refactor This" (CtrlShiftR) menu work?

Serge Baltic
JetBrains, Inc —
“Develop with pleasure!”


It only works in the sense that "Rename" shows up, where as if I navigate to the object explorer on the same method name, I get about 14 refactoring options instead of just rename.


I have the same problem. Have you found out the fix for this?


I have the same problem and Ctrl+Shift+R does bring up the Resharper dialog, but only Rename available (context is a public class)



I have the same problem and CtrlShiftR does bring up the Resharper
dialog, but only Rename available (context is a public class)

No, I do not have any positive idea yet.

R# refactorings should be available at three locations: main menu (ReSharper
-> Refactor), context menu (Refactor submenu), and "Refactor This" (CtrlShiftR).
As for the main menu, all of the refactoring items should always be present.
They could be greyed out if the particular refactoring is not available,
but shouldn't be hidden. Are they there?

Does "Safe Delete" (CtrlRD in VS layout) work on a public class?

Serge Baltic
JetBrains, Inc —
“Develop with pleasure!”



Thanks for the help and explanation.   Bottom line, R# works fine, I was using it incorrectly.  I did not realize that I had to have the cursor exactly on the thing that I wanted refactored without highlighting.    

This is slightly different than the way that Visual Studio works but entirely logical.  For example, in Visual Studio you can be anywhere in the class white space to get the "Extract Interface" refactoring.  However, in R# you just click on the class name, not highlighting it, and you get the refactorings.

Thanks again Serge for the help.




Yes, I admit the behavior could be confusing somewhat, especially with selection
versus just placing the caret.

The reasoning for exposing class-related refactorings on the class name only
(as opposed to anywhere in the class) is that we'd like to have the "Refactor
This" menu as short as possible. Otherwise it would have too many items to
navigate through it quickly. Same applies to selection versus caret: there're
refactorings specifically applied to the selected range, and in that case
regular ones are pushed aside to keep the list short.

The possible objections are:

  • OK the short "Refactor This" menu does not have class-related refactorings

when I'm inside the class, why can't I still invoke them explicitly from
the main menu (disables instead of hiding, so the list is always large) or
with a keyboard shortcut? — I think that for some of the refactorings this
is done for clarity (for example, Safe Delete could apply both to methods
and classes, if you're outside both method name and class name, it would
get confusing whether it's trying to delete the nearest method or the containing
class), while for others, like extract interface, it just has not been implemented
(separate behavior of short and full menus). Space for improvement :)

  • If the class name is selected, then there're no special selection-range-based

refactorings (like there are on expressions inside method bodies), so the
no-selection refactorings should still be available. — Well, they should.
Some of the refactorings actually are available, and others are not. Good
point, here's a bug on our part.

Serge Baltic
JetBrains, Inc —
“Develop with pleasure!”


I found a solution to this same problem:

If the class declaration is within another class it's greyed out... temporarily comment out the parent class(es) and then "Extract Interface..."



Please sign in to leave a comment.