I want my C# Windows Service to automatically update itself [closed]

The only way to unload types is to destroy the appdomain. To do this would require separation of your hosting layer from your executing service code – this is pretty complex. (sort of like doing keyhole surgery)

May be easier to either a) run a batch task or b) in-service detect updates then launch a seperate process that stops the service, updates assemblies etc. then restarts it.

If you’re interested in the former, the MSDN patterns and practices folk wrote an app updater block that you adapt to your service.

https://web.archive.org/web/20080506103749/http://msdn.microsoft.com/en-us/library/ms978574.aspx

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)