Updating resource strings for ASP.Net MVC does not

2019-05-31 21:45发布

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?

2条回答
对你真心纯属浪费
2楼-- · 2019-05-31 22:41

As per /u/Markus suggestion, I tried to build the code again. After changing the main dll file, and copying the resources folder again, it works.

查看更多
淡お忘
3楼-- · 2019-05-31 22:51

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.

查看更多
登录 后发表回答