Unable to Replace new .exe with old .exe when i serve my app to windows Service Manager. #140
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Hi @ritishbhardwaj, if I understand correctly, your service continually looks for your app processes, and starts a new process if it does not find one. Is that correct? Your screenshot shows two processes for demoApp1.exe. Do you need multiple or do you normally have only one process running? |
Beta Was this translation helpful? Give feedback.
-
In any case, keep in mind that tufup "installs" an update by overwriting the content of your app's installation directory. On windows, this is not possible as long as the app itself is still running, because the executable file is still in use. For more information, see e.g. https://stackoverflow.com/q/196897. For this reason, when the tufup client "installs" an update, it will first start a separate (independent) process that runs the windows
If your app is running in multiple processes, you will need to terminate all those processes, otherwise robocopy will keep failing. |
Beta Was this translation helpful? Give feedback.
-
hi @dennisvang any reply for the above [https://github.com//discussions/140#discussioncomment-9546344] ? |
Beta Was this translation helpful? Give feedback.
In any case, keep in mind that tufup "installs" an update by overwriting the content of your app's installation directory.
On windows, this is not possible as long as the app itself is still running, because the executable file is still in use. For more information, see e.g. https://stackoverflow.com/q/196897.
For this reason, when the tufup client "installs" an update, it will first start a separate (independent) process that runs the windows
robocopy
utility (source), and then exits the running app's process (source). As long as the app process has not exited completely, robocopy will fail, and another attempt is made after a short timeout. This is what you are seeing in the error: