Recently, I ran into a great free Microsoft tool which is called - Resource Refactoring Tool. This tool provides developers an easy way to extract hard coded strings from the code to resource files.
Resource files (.resx files) consists of XML entries, which specify objects and string inside XML tags. Those files can be opened with text editors and are completely readable and maintainable. One of its common usage is for localization.
Tool features:
- Works with C#, VB.Net languages.
- Supports all project types including web sites and web application projects.
- Finds other instances of the text being replaced in the project automatically.
- Lists existing resources by their similarity level to the text being replaced.
- Automatically replaces hard coded string with a reference to resource entry.
- A preview window to show changes.
How does it work?
Right click on a hard coded string, choose Refactor and then Extract To Resource.
The next screen pops up where we can:
- Choose whether to extract just the current hard coded string / All instances in the current source file / All instances in the project.
- Choose whether to use an existing resource file or to create a new one.
- Create a new entry in the resource file.
- Getting a preview dialog to see the changes before they actually happen.
After closing this dialog, the string will automatically be replaced with the reference to the resource that have been chosen.
This tool works on Visual Studio 2005 and 2008, but when both Visual Studio 2008 and 2005 are installed, the Resource Refactoring Tool is not installed on Visual Studio 2008.
Download it here, enjoy…

















By Regev Porat on Apr 13, 2008 | Reply
Very nice - thanks!!