VS2013 Web项目已发布的Globalization.en.resx修改不生效求助
Hey Daniel, I’ve run into similar resource caching headaches before—let’s walk through some fixes that might get your updated English resources showing up on the server:
Verify Server Deployment & Clean Up Old Files
Even if dotPeek shows the correct DLL in your local bin, sometimes the server’sbin/endirectory might have leftover old files that are being loaded instead. Try manually deleting the entirebin/enfolder on the server, then re-publish your project to ensure fresh copies are deployed. Double-check that the newresources.resources.dllis the only one in that folder after publishing.Clear ASP.NET Server-Side Cache
ASP.NET caches resource assemblies aggressively. To force a refresh:- Restart your website’s application pool in IIS—this will clear all cached resources and force the server to load the new DLL.
- Make a tiny edit to your
web.config(like adding a blank line and saving it) to trigger an application restart. This is a quick way to reset the cache without touching IIS directly.
Double-Check Resource File Properties in VS
Ensure yourGlobalization.en.resxhas the correct build settings:- Right-click the file in Solution Explorer and select Properties.
- Confirm Build Action is set to
Embedded Resource. - Make sure Custom Tool is set to
ResXFileCodeGenerator—this ensures the resource is properly compiled into the satellite assembly.
Validate Browser Language Priority
Even with cache cleared, Chrome’s language settings might be prioritizing German over English, making it look like the English resources aren’t updating. Go to Chrome’s Settings > Languages, drag English to the top of the list, and test again. You can also add a query string like?culture=en-USto the URL to explicitly force English culture for testing.Check Code for Hardcoded Culture Settings
Take a quick look at your code to make sure there’s no place where the UI culture is being forced to German. For example, check if there’s code likeThread.CurrentThread.CurrentUICulture = new CultureInfo("de-DE");that’s overriding the browser’s language preference. You can add a debug log to outputThread.CurrentThread.CurrentUICulture.Nameto confirm the correct culture is being used.
Hopefully one of these steps fixes the issue—resource caching can be sneaky!
内容的提问来源于stack exchange,提问作者dan

