Oxyprogrammer
Oxyprogrammer

Reputation: 1263

.Net Installation: Overwriting the old version with the new one

I have created an installation project for Outlook Plugin application using Add In Express. I wish to create an installation package that would simply overwrite the previous version without asking the user to manually uninstall the previous version.

Well this is becoming a real problem for me. Certainly the internet has some information on this but even with all that info and experimentation I am not able to get out of this. I have set the property values of the set up project thus:

1) DetectNewerInstalledVersion : True
2) InstallAllUsers : True
3) RemovePreviousVersions : True
4) UpgradeCode : Same as in the previous version
5) ProductCode : has been changed by VS itself as I incremented the Version 
   property of the set up project (I clicked yes).

I have also incremented the Assembly version of the Outlook Plugin project in the AssemblyInfo.cs class.

Result:


The .msi file on double clicking, installs the new version and does not uninstalls the older version. :( I am using .Net 4.0 with Windows 7. Any help is appreciated.

regards,

Upvotes: 1

Views: 3783

Answers (1)

Mark Hall
Mark Hall

Reputation: 54532

Has TomTom has stated, we need to know what technology you are using. I am going to assume that you are using the Installer package with Visual Studio. To have the installer automatically uninstall your application you need to set RemovePreviousVersion to True and make sure that you increase the version number of your application by at least the Build number.

Upvotes: 2

Related Questions