Search code examples
.netwindowsserviceupdating

Updating a .Net Windows Service


Is there a more graceful way of updating a .Net Windows Service other than using InstallUtil to uninstall and re-install? Note - I will be doing this programmatically.


Solution

  • I succesfully experienced this:

    • Stop the service
    • Replace the old EXE, DLLs and stuff by the new one using a file copy
    • Restart the service

    It works pretty well, unless your service name (or EXE filename) has changed: then you will have to uninstall it and reinstall it.

    I do not use strong naming nor GAC features, and I do not know if restrictions applies in such a case.