Search code examples
c#asp.net-mvciisresourceslocalizable.strings

Updating resource strings for ASP.Net MVC does not change the output


I am trying to modify the string values for a resx file of an existing application. I have done nothing else apart from just changing the string value to replace a word (from "technician" to "agent"). File name and permissions are same, even the structure and naming convention is same.

Now, these changes do not reflect in IIS. I have restarted app pool, refreshed the application, double checked the permissions. Nothing seems wrong anywhere. I even tried the suggestions in older similar questions, but no luck.

I am not sure, if I need to recompile the whole solution, although, I believe that should not be the case. Do I need to do that? Also, will I have to republish the website from scratch, or can I just replace recompiled files in the IIS folder?

Or is there some other step I am missing?


Solution

  • You need to do a clean build and then just replace the main dll for your site in the bin folder. Sometimes Visual Studio doesn't see the change in resources and, in turn, it doesn't trigger a rebuild on your DLL. Clean build ensures the changes are built.