Is there a way to ensure an MSI installer updates the .exe file every time?

倾然丶 夕夏残阳落幕 提交于 2020-01-03 09:07:42

问题


Is there some easy, hassle-free way to get the MSI installation to always replace the .exe file (i.e. Primary Output) whenever the .exe file is more recent?

This is just basic and common sense. Wherever I search there are always complicated discussions about major and minor versions and patches. There must be some simple way to ensure the file gets replaced during an install. Otherwise, what is the MSI file actually doing during the whole installation procedure. It's like a fake install where nothing actually gets replaced/updated/upgraded.

What am I missing?


回答1:


Everything works in a "common sense" way as long as you increment the version number of the .exe. MSI trusts version info over more malleable aspects like a file's timestamp.




回答2:


In File table you can set the Version column to "65535.65535.65535.65535". This way the file will always be overwritten, no matter what version it actually has.

This is not supported by Visual Studio, but you can edit the MSI with Orca.




回答3:


Set your assembly version of your project to 1.0.* then it will automatically produce a new .exe version. You also need to make sure you increase the setup version, sadly there isn't a way to get this to auto-increment.



来源:https://stackoverflow.com/questions/6307241/is-there-a-way-to-ensure-an-msi-installer-updates-the-exe-file-every-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!