views:

444

answers:

1

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 ..

+4  A: 

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: http://realfiction.net/?q=node/158

flq