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?
EDIT: 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)
I solved this by setting the 'InstallerClass' property of my custom action to False.
Did you include the output of your installer code in the Code Actions tab of the installer?
If that's not it...
I ran into a similar problem in the past and found I needed all 4 methods defined or the uninstall would not run. Add your code to the template below:
Hope this helps!
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.
I've created an installer project for an wpf application, similar to your setup, see here, the problem described there is less important for this topic.
I had the same issue here... hurt my head to find out why!!! It turns out though that my install project had the Primary Output of the service set to the "Release", while i was making alterations in the project to the Installer in "Debug". The moment I set them to be the same, my MessageBoxes popped up to show the code was being executed...
.. you can update your project to a much neater solution now :)
I don't Know actually why your override uninstall not working . But whenever i face this issue i make a log of the uninstall process . And according to that you can easily check where the problem resides ! Here is the method to make a log by installer class.
and call this method in Override function like ->
At lastly Windows msi ...is not so bad ..Just dont call it rubbish Plz ..:)