问题
I have an MSI installer project that installs a windows service.
My version numbering method is best described by this post: What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?
I am not changing the Version of my install project as that is not changing, and I've had too many issues when doing that.
I have already installed my service with the following assembly versions
[assembly: AssemblyVersion("4.3")]
[assembly: AssemblyFileVersion("4.3.0.0")]
I just built an MSI installer to this version:
[assembly: AssemblyVersion("4.3")]
[assembly: AssemblyFileVersion("4.3.1.0")]
When I run the MSI it tells me that I need to uninstall the previous version.
How do I get around this? What I ultimately would like to do is:
- Install an MSI
- Install (re: upgrade to) another version that overwrites the previous version (prompt or no prompt) a. I do not want to have to un-install before I install an update.
My installer project properties are:
RemovePreviousVersions - True
InstallAllUsers - True
DetectNewerInstalledVersion - False
Version - 4.3.0
What I have tried:
- Update the Assembly Version of the project. However, this creates multiple versions of the same products in Add Remove Programs. Not want I want for windows services
- Change the version # on the installer project. But this creates a lot of errors when trying to install any version of the MSI. I even got warnings that I was installing on a network drive! (wow).
Any help would be rockin!
Thanks.
回答1:
in the setup's setup project properties you need to increment the "Version" property for each version, while keeping the same UpgradeCode.
When you increment the version it will prompt you if you want to change the ProductCode, Answer "Yes".
You must also have the properties for removing the previous version, and detecting new versions set to true.
来源:https://stackoverflow.com/questions/7856454/net-msi-install-project-overwrite-previous-version