locked
How to refresh Resources.resx ? RRS feed

  • Question

  • User-1717199157 posted

    Hi,

    I want to add resource strings to Resource.resx but even doing clean → build, the web always returns error  ( I follow Updating resource strings for ASP.Net MVC does not change the output ) 

    Cannot retrieve property 'Name' because localization failed.  Type 'Resources.Resource' is not public or does not contain a public static string property with the name 'XXX_NEW_COLUMN'.

    Access modifier is set to be public, the old resource works well, so I think the problem is somewhere else.

    I notice a dll called "App_GlobalResources.gkoac70j.dll" both in Web project and Entity project and it is not refreshed.

    If I manually delete this dll, the references between Web and Entity get failed.

    Not sure how to refresh this Resources/dll ? 

    Settings of App_GlobalResources
    
    Build Action : Embedded Resource
    Copy to Output Directory : Do not copy
    
    Custom Tool : PublicResXFileCodeGenerator
    Custom Tool Namespace : blank

    Thank you

    Friday, March 10, 2017 12:03 PM

Answers

  • User2119946224 posted

    Hello

    Please check the Build Action property of each .resx file. In my project I set to "Embedded Resource". and custom tool is set to PublicResXFileCodeGenerator

    Access modifier of the .resx file is set to public. Please give a try

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 20, 2017 4:14 AM

All replies

  • User2119946224 posted

    Hello

    Please check the Build Action property of each .resx file. In my project I set to "Embedded Resource". and custom tool is set to PublicResXFileCodeGenerator

    Access modifier of the .resx file is set to public. Please give a try

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, June 20, 2017 4:14 AM
  • User-552477072 posted

    Hi. 

    Answer fro refreshing Resources.resx

    Make sure Custom tool property for your resx file be ResXFileCodeGenerator or PublicResXFileCodeGenerator.

    Then the .Designer.cs file must be regenerated every time you modify the resx file; 

    If doesn't work, you can force it by selecting Run custom tool in the context menu for the resx file. 

    Hope it will be okay for you.

    Pls don't forget to marks as Answer if it helps you! Thanks

    Friday, December 7, 2018 7:35 AM