Do you need to re-install a Windows service after rebuilding

懵懂的女人 提交于 2019-12-22 03:21:42

问题


If I rebuild a Windows Service after making changes, can I just copy and replace the old assembly / .exe files to get those changes to run or do I need to re-install the service? Also do I have to first uninstall the service before installing the new version?


回答1:


You don't have to uninstall and reinstall the service since this only adds registry info regarding the executable path and launch options. Just stop the service, copy your assemblies and restart it




回答2:


You do not need to uninstall the service just make changes in your files after stopping the service and then start again it will consider your changes..

I would suggest you to use Topshelf for service hosting.



来源:https://stackoverflow.com/questions/26253357/do-you-need-to-re-install-a-windows-service-after-rebuilding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!