0

I am working on a multilingual ASP.NET MVC application (MVC4).

I want to make my resource file strings to be editable at runtime without recompiling the appliaction and I have done it successfully but the changes are not reflected on UI, however the new updated value of a key are shown in .resx file when I observed .resx file with XML editor

enter image description here

The Changes are only reflected when I recompile the application.

How can I make it to reflect changes on UI without recompiling the application?

Thanks.

Pawan
  • 1,704
  • 1
  • 16
  • 37

2 Answers2

-1

Here is nice explanation why you cannot update resx resources without recompile. In this thread there is also a workaround how you can use resx for realtime changes, but keep in mind that your app pool will be recycled after aech change to this file, so all existing sessions will end. I advice to use custom XML file or DB for this purpose and avoid such workarounds.

Community
  • 1
  • 1
ntl
  • 1,289
  • 1
  • 10
  • 16
  • thanks @ntl. I have checked the link you mentioned.And I have maintained to prevent app pool from being recycled(somehow).The updated fields are shown updated in XML(as shown in Qus.) but are not reflected in UI. Also project is about to complete so cannot adopt other options DB/Custom XML. – Pawan Aug 19 '14 at 09:33
  • I am able to edit .resx resources without recompile and without app pool recycle, but the updations are reflected only after recompile. – Pawan Aug 19 '14 at 09:48
  • Hm...you may try another solution, I've created another answer, please check it. Don't forget to revert changes that you've done wihin this approach. – ntl Aug 19 '14 at 10:52
-1

Check this thread it seems that you can use resgen.exe tool to prepare your updated resources and al.exe to integrate changes to your compiled library.

Community
  • 1
  • 1
ntl
  • 1,289
  • 1
  • 10
  • 16