C# Way to recompile while running?
I have a simple telnet server, users connect and they are brought into a room with there IP Address's as the usernames and they can chat, this is strictly a learning experience. What I want to accomplish is to devise a way to make changes to the code while the application is running, with a very limited amount of interupt. For example, have the actual released program running, and I have the project in the IDE and I make a change, re compile it to the location of the running release .exe, overwrite it.
I doubt this is actually possible but, let me no the closing thing to this that is possible (other than using a different programming language).
Thanks
Re: C# Way to recompile while running?
I just thought of an idea: What if the entire server logic is all located in .dlls, and then edited the respective one then copied it to the program folder. Would that work or would that crash the program?
Re: C# Way to recompile while running?
No, because the DLL's will already be loaded into the process space. You are essentially asking how to modify an executable in memory. What exactly are you trying to accomplish with this?
Re: C# Way to recompile while running?
Only way I know is to run the assembly in separate appdomain, which you will unload if the assembly would change and create new and load and run new assembly in it.