c# - Update application's libraries (DLLs) during runtime? -


What's going on in C #, but there is no way to update DLL? For example, if DLL looks with a function:

  write a zero () {Console.WriteLine ("LALALA"); }  

and it is said in a thread with a sod of 1 second between calls.

Now, I have written a new version:

  write a zero () {Console.WriteLine ("la la la la nay"); }  

Can I update the old DLL with this new one during runtime? It is important that my APP is running from time to time, there is no meter ... but I think updating libraries is an exception, am I wrong?

If your code can be isolated in different DLLs, then you (as another Can be mentioned) Remoting or system. Depending on the AddIn framework, how functionality is integrated, it can be very complex and / or overkill. One advantage of the System.AddIn method is that assemblies can be unloaded, with a new version, DLL Is replaced, and the app is reloaded without pausing - it is designed only for light plugin architecture, and there is also a performance across the 'isolation limit' which is going to be very good.

If enough areas (like some) are small then you can be useful - you can load code in text files (or database or anywhere) and load / run it from there So just change the code and reload it.

I think that all this comes down to whether you can recognize the possibility of that change, and if there is a separate process that makes it suitable it is not easy to do in the entire application!


Comments