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 - a开发者_StackOverflowdding new properties for the new rows.
But in my situation, that automation has stopped working. Have you met the same problem? If you do, please help me to get .resx back to work :)
Thank you!
A very similar problem arises with aspx/ascx files. This involved deleting the designer and then clicking "convert to web application" to force code gen of the designer again. Don't know if a similar facility exists for the resx.
Here what I found that works:
Delete the
Resources.Designer.cs
fileIn Solution Explorer, exclude the
Resources.resx
Then, show all files, re-include the
Resources.resx
. TheResources.Designer.cs
file should be recreated then.Reset the 'Access Modifier' to be 'Public' (see details here)
Right click
Resources.resx
in Solution Explorer and clickRun custom tool
Hope this would be helpful to you!
精彩评论