ReSharper for Visual Studio Code Help

Refactor code

There are two ways of refactoring code in ReSharper for Visual Studio Code: apply local code transformations (or context actions) and apply global refactorings, which will analyze the entire solution and make sure that all affected references are properly updated.

To list context actions available for the current caret position, press ⌥ ⏎. Press or to pick the desired action, and then press to apply it.

ReSharper for Visual Studio Code: Local code transformations

In contrast to local transformations, global refactorings have dedicated shortcuts and menu entries. For example, to rename a symbol and all its usages in the current solution, set the caret at it and press ⌃ R or choose from the context menu (you can start either at the declaration or at any usage).

ReSharper for Visual Studio Code: Rename refactoring

After typing a new name, you can either apply the rename or preview the changes:

ReSharper for Visual Studio Code: Rename refactoring preview

If the new name of the symbol conflicts with an existing one, a conflict dialog will appear. This dialog will highlight the conflicts and provide options to either cancel the renaming or proceed with it, accepting the conflicting state.

17 May 2025