If you were using this tool in Visual Studio 2008 and then upgraded your solution to Visual Studio 2010, you might have noticed that this functionality no longer worked. You also might have received an error, which you dismissed.
ResXFileCodeGeneratorEx is an awesome tool and I’m surprised it still hasn’t been officially updated to support Visual Studio 2010.
Well after doing some digging around, I found an article with a work around that enables this functionality in Visual Studio 2010. Here are the instructions to get it working on your machine, followed by an example:
- Shut down Visual Studio 2010.
- If you don’t already have the tool ResXFileCodeGeneratorEx downloaded and installed, please do so. You can get the latest installer from http://dmytro.kryvko.googlepages.com/
- Save the attached file in this email and remove the .temp extension.
- Double click the attached file that you renamed and have it add its contents to your Registry.
- Restart Visual Studio 2010.
Here is a working example of how to use the tool. Say you want to add a new entry to the PageText.resx resource file contained in your solution and the entry was “Abandoned”:
- Open up PageText.resx by double clicking the file.
- Add “Abandoned” in the name and “Abandoned” in the value.
- Click Save.
- Next right click on PageText.rex and click on Run Custom Tool as shown below…
- Now you can reference this value from your code by typing in PageText.
Hope that helps.