为什么未从msi调用我的卸载方法? [英] Why is my Uninstall method not called from the msi?

查看:60
本文介绍了为什么未从msi调用我的卸载方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的Web应用程序编写安装程序,而我在卸载程序部分苦苦挣扎.尽管我在应用程序安装项目"中针对卸载"创建了自定义操作,但InstallerClass设置为true,方法为:

I am writing an installer for my web app and I struggle with the uninstaller part. Despite the fact that I created a custom action on Uninstall in my Application Setup Project, the InstallerClass is set to true, the method:

public override void Uninstall(IDictionary savedState)
    {
        //MessageBox.Show("Attach debugger!", "Viper.Setup");
        Cleanup();
        base.Uninstall(savedState);
    }

在安装程序类上的

似乎没有被调用.任何想法可能是什么原因?

on the installer class doesn't seem to be called. Any ideas what could be the reason?

我还注意到它不仅不会运行安装程序,而且不会删除我的主dll文件.更糟糕的是,当我在卸载前一个版本后安装新版本时,该dll仍然是旧版本(即使安装和卸载成功)

I also noticed that it not only doesn't run the Installer, but also doesn't delete my main dll file. To make it worse, when I install a new version after uninstalling the previous one, this dll is still the old one (even though installation and uninstallation were successful)

推荐答案

我停止使用这些垃圾msi,而是创建了一个zip + cmd脚本.强烈建议,我花了不到10倍的时间进行设置并开始工作.

I stopped using these rubbish msi's and created a zip + cmd script instead. Strongly recommended, took me 10 times less to set up and actually works.

这篇关于为什么未从msi调用我的卸载方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆