Automatically update the dependency dll for existing setup

606 Views Asked by At

I'm trying to create a setup file or .EXE file for my project using this link.I may able to create properly but whenever change my DLL files, I have to uninstall and install the Setup file for service. How can we create a setup file for automatically update the changed DLL.

SETUP FILE

This setup file contains

  • MyProject.DTO.DLL
  • MyProject.DataManager.DLL
  • MyProject.DataEngineService.DLL

Changes In DLL

I have changed the DTO dll, now i have to build the setup file and reinstall in my windows for update the service, how can we do automatically ? Any idea.

1

There are 1 best solutions below

0
On

We have done something similar, Let me call the new installer that you are going to create to update the service dll Service 2.0.

  1. Service 2.0 will not have any logic to install any service. Purpose of this installer would be to simply update a dll of a running service.

  2. You need to create a console application which will have logic to, STOP the existing/running service. Copy dll from specific folder to existing service folder. once the file is copied console will START the service again.

  3. You need to pack this console executable into Service 2.0. Within the custom action of Service 2.0 you will simply execute this console.

  4. As I have mentioned in 2nd point, This console will complete it's operation. Until console completes the process Service 2.0 will wait.

  5. You can put logic within custom action of Service 2.0 in such a way that it can either roll back it's installation after dll update completes(So you will not have two different installations)