Visual Studio Setup Project doesn't upgrade to new program

不羁岁月 提交于 2020-08-22 11:41:21

问题


Ok, here are the steps I've taken...

Create and customize Setup project

Set Setup project Version=1.0.0
Build Setup project
Install version 1.0.0
Run program, which displays "v1.0.0" in the Window's Title bar

Change code in program to display "v1.0.1" in the Window's Title bar
Set Setup project RemovePreviousVersions=True
Set Setup project Version=1.0.1
Change ProductCode (as prompted)
Build Setup project
Install version 1.0.1
Run program, which displays "v1.0.0" in the Window's Title bar

The new installer installed the old version of the software. In the control panel's "Programs and Features" (this used to be "Add/Remove Programs") it shows that version 1.0.1 is installed. I've been through more than one tutorial, like http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

When you’re ready to build a new version of your product to replace an older one, follow these steps:

  • Increment the version property (see Figure 1). Visual Studio displays a message box that prompts you to change the ProductCode and PackageCode. Select yes.
  • Set the RemovePreviousVersions property to true.

Setting the RemovePreviousVersions property to true removes previous versions of the product from the system as you install the new version. Since products are identified by the ProductCode Guid, changing the ProductCode creates a new product. That is, the old product is uninstalled as you install a new one.

If I manually remove 1.0.0 from the Control Panel, and then install 1.0.1, then the program runs showing "v1.0.1" properly.

What am I missing here?


回答1:


Realise this is old but I have just had the exact same problem.

I resolved it by updating the assembly and file versions for all projects (rather than just the exe as I had done previously).




回答2:


I recently had this exact same problem and figured out the solution by trial and error. Even though your setup project has been incremented correctly you also need to increment the Assembly Version which can be found in the Assembly Information section of Project Properties.




回答3:


Have you update the file version number in your resource file too?

http://msdn.microsoft.com/en-us/library/6fkzft86.aspx



来源:https://stackoverflow.com/questions/5600596/visual-studio-setup-project-doesnt-upgrade-to-new-program

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