简体   繁体   English

C#服务在卸载时崩溃

[英]C# service crashes on uninstall

I've been working to update a C# service with a new Visual Studio 10 Installer. 我一直在努力使用新的Visual Studio 10安装程序更新C#服务。 The old installer is a batch based installer that is a pain to use with Windows 7 and higher, but still works correctly (for both install and uninstall). 旧的安装程序是基于批处理的安装程序,很难在Windows 7和更高版本上使用,但仍然可以正常使用(适用于安装和卸载)。

I created the new Visual Studio Installation project using this as my guide. 以此为指导创建了新的Visual Studio安装项目。

The solution includes a small application used to show the service status in the tray. 该解决方案包括一个小应用程序,用于显示托盘中的服务状态。 It's output is added to the installation project and included in all of the custom actions alongside the service. 它的输出被添加到安装项目中,并与服务一起包含在所有自定义操作中。

The service installs and runs correctly with my new installer, but uninstall causes a happy little blue screen of death. 该服务可以使用我的新安装程序进行安装并正确运行,但是卸载会导致蓝屏死机。 The dump shows the crash is coming from ntoskrnl.exe+22fa3 (Critical_Object_Termination). 转储显示崩溃来自ntoskrnl.exe + 22fa3(Critical_Object_Termination)。

What methods can be used to track down a crash that occurs during uninstall? 可以使用哪些方法来跟踪卸载期间发生的崩溃?

If the service can be stopped, then there is something really aweful in your custom action. 如果可以停止该服务,那么您的自定义操作中确实会有一些令人毛骨悚然的事情。 Custom actions shouldn't be needed in the first place so try this tutorial instead. 首先不需要自定义操作,因此请尝试使用教程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM