开发者

Updating the MSI for a Project in Visual Studio 2008

In reference to the post below, where it says I should increase the version number for older versions to be replaced by newer ones.

MSI Installer fails without removing a previous install

What I find is, just changing the version number didn't do the job. I had to c开发者_JAVA技巧hange the product code also, which I got an option to change through a Message Box just after changing the Version Number.

Is this how it's supposed to be?


I think Visual Studio setup project uses the version number to generate the Product Code which is why you must update both. The product code is a unique GUID that identifies the installed application. It is good practice to update both each time you release an installer. Otherwise the client will get a message that says something like "Another version of this application is already installed, please uninstall that version first..." etc. and the MSI will not install the new version.

So to remove a previous version before installing a new version you must set RemovePreviousVersions property to True and update the version number and product code.

You can automate the version number and product code part by executing a script in the PreBuildEvent of the setup project. You can find interesting article and sample script on CodeProject http://www.codeproject.com/KB/install/NewSetupVersion.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜