本文介绍了在Installer.OnBeforeUninstall方法之前触发Installer.Uninstall方法。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个.NET 3.5 Windows服务,正在使用"设置&部署项目"用于安装和卸载。在服务之前并成功卸载我需要停止服务,但这比我想象的要困难得多。

当我运行卸载程序时,我收到错误消息,说明该进程正在使用中。我以为我可以覆盖OnBeforeUninstall方法并停止进程,但错误发生在调用该方法之前。我还对所有安装程序方法进行了测试,并且在发出此错误之前找不到任何触发的内容。

When I run the uninstaller I get an error saying that the process is in use. I thought I could just override the OnBeforeUninstall method and stop the process but the error happens before that method is called. I also did a test on all of the Installer methods and cannot find anything that fires before this error is given.

此外,在对日志文件进行测试时,我甚至注意到在Installer.OnBeforeUninstall之前调用了Installer.Uninstall方法。这对我没有任何意义。

Also, when doing a testing a writing to a log file I even noticed that the Installer.Uninstall method gets called before the Installer.OnBeforeUninstall. That doesn't make any sense to me.




代码段

推荐答案


这篇关于在Installer.OnBeforeUninstall方法之前触发Installer.Uninstall方法。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 00:17