ReSharper Web Help

To move string to resource
  1. Place the caret at the string that should be localized:
  2. On the main menu, choose ReSharper | Refactor | Move or press F6. The Move to resource dialog box opens:
  3. Optionally, you can change name of the localizable string in the Name text box.
  4. Optionally, you can change the target resource file, select value in the Resource File drop-down list.
  5. Optionally, you can change value in the Value text area or add some text in the Comment text area.
  6. Optionally, you can specify where to search for the string by selecting the value in the Find identical items in drop-down list.
  7. Click Next to apply refactoring.

After applying the refactoring specified occurrences of the string are replaced with corresponding resource usages:

New resource declaration appears in the .resx file:


ReSharper defines whether to highlight a string or not depending on project specific settings. For more information, see Quick-Fixes .


ReSharper provides the same functionality for ValidationAttribute and its inheritors. Pay attention, that Access Modifier in .resx file should have Public value, otherwise, the refactoring will not be available.

See Also