I'm trying to rename a namespace. For some reason, ReSharper isn't giving me the option to do so. I right click on it and choose Refactor, but everything except "Convert" is greyed out. I try the key combination CTRL R + R, and it says the command is unavailable. What am I doing wrong?
Here is documentation suggesting that what I am trying to do should work:
http://www.jetbrains.com/resharper/documentation/help20/Refactoring/renaming.html#renameNamespace
I'm using Visual Studio 2008 with R# 4.5
I have come across this before and the answer is very subtle. Do not select (eg by double clicking) the entire method name(or namespace if renaming a namespace). Instead, ensure the method name is deselected and place the caret over the method name. eg
NOT this
When you select the Convert menu the items should now be available for methods, and 'Rename' will become available if you had the caret over a namespace. In my mind this should be changed, it is not obvious.
Apparently, the way to do this now is via ReSharper => Refactor => Adjust Namespaces
menu or open the Class View, right click on the namespace you wanted to rename and again select Refactor => Adjust Namespaces
.
See also: Fastest way to update namespaces with ReSharper?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With