-
May 17th, 2011, 10:50 PM
#1
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
-
May 17th, 2011, 11:02 PM
#2
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?
-
May 19th, 2011, 12:38 AM
#3
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?
-
May 19th, 2011, 01:41 AM
#4
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.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|