Last post Dec 07, 2018 07:35 AM by email@example.com
Mar 10, 2017 12:03 PM|Nancy Q|LINK
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
Jun 20, 2017 04:14 AM|hkholakiya|LINK
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
Dec 07, 2018 07:35 AMfirstname.lastname@example.org|LINK
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.
Run custom tool
Hope it will be okay for you.
Pls don't forget to marks as Answer if it helps you! Thanks