开发者

Why is the Uninstall method not being called during installation?

开发者 https://www.devze.com 2023-02-20 14:26 出处:网络
I am aware that there are other questions that are similar but either they are not 开发者_如何学Canswered properly or the answer isn\'t fixing my problem.

I am aware that there are other questions that are similar but either they are not 开发者_如何学Canswered properly or the answer isn't fixing my problem.

My program has a main framework as well as various plugins for the framework. The plugins are managed via an XML file which contains the information needed by the framework to dynamically load the plugin.

I have a common Installer class which is used to handle the custom actions during installation for the Plugins.

During installation it needs to load the XML file and add a new node in it listing the information needed to load the plugin.

During uninstallation it just needs to remove that same node from the XML file.

Installation is working fine. When I attempt to uninstall the Plugin, the Installer's Uninstall method doesn't even get called.

If any more information is needed, please don't hesitate to ask.


I experienced the same problem, that the uninstall method did not get executed. After I uninstalled the setup and all files in the target location, I removed all references in the registry with the setup name and primary output file name. (Except those key values used by visual studio) After that, the uninstall method was executing again. It looks like previous unsuccessful installations where not cleaned up well in the registry.


Try removing the uninstall custom action save the project and then add it back again. Also, if you want to debug the setup package, you can add the following:

Debugger.Launch();

At the beggining of the overriden method instead of using message boxes.


Have you confirmed that the Custom Action is configured properly? I'd recommend you put in some MessageBoxes all over the place so you can track what's happening.


Have you tried the solution mentioned here

I believe sometimes Visual Studio does an in place upgrade, and doesn't actually uninstall the old version.

0

精彩评论

暂无评论...
验证码 换一张
取 消