How can I update some Windows Service Seperated Assemblies without restarting the service?
Note: This Windows Service hosted WCF Services, so in addition without restarting the service and so don’t shutdown down WCF Clients ..
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AFAIK, you will have to run the restartable stuff in its own AppDomain, and setup the domain such that ShadowCopyFiles is set to true. You may also choose your own CachePath into which relevant dlls will be copied.
Henceforth you can use a FileSystemWatcher to check the original location of your dlls for any changes.
Once there are, unload the AppDomain, clear the cache, and set up the AppDomain as before.
For simple starting of a new AppDomain with clearly defined Start, Stop points in your code that will get executed in your new AppDomain I humbly point you to my page: A simple way to start your code in a different AppDomain