How to get the code-generation of `.resx` resource file back-to-work?

Hi everyone,

Normally when we add new rows to a .resx file, say Resources.resx, in the IDE’s resource editor, the code-behind file, say Resources.Designer.cs, will be automatically updated – adding new properties for the new rows.

But in some situation, that automation job stops working!? Then, how can we re-activate the IDE so that the .resx’s code-behind return to work?

Here what I found:

  1. Delete the Resources.Designer.cs file
  2. In Solution Explorer, exclude the Resources.resx
  3. Then, show all files, re-include the Resources.resx. The Resources.Designer.cs file should be recreated then.
  4. Reset the ‘Access Modifier’ to be ‘Public’
  5. Right click Resources.resx in Solution Explorer and click Run custom tool

Hope this would be helpful to you!


ps. You can see my discussion on SO here.


2 responses to this post.

  1. Posted by Veli on June 28, 2011 at 4:02 PM

    thank you for this, helped me solve my issue


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: