Visual Studio 安装项目不会升级到新程序 [英] Visual Studio Setup Project doesn't upgrade to new program

查看:58
本文介绍了Visual Studio 安装项目不会升级到新程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这是我采取的步骤...

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

创建和自定义安装项目

设置安装项目版本=1.0.0
构建安装项目
安装版本 1.0.0
运行程序,在窗口的标题栏中显示v1.0.0"

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

更改程序中的代码以在窗口的标题栏中显示v1.0.1"
设置安装项目 RemovePreviousVersions=True
设置安装项目版本=1.0.1
更改产品代码(根据提示)
构建安装项目
安装版本 1.0.1
运行程序,在窗口的标题栏中显示v1.0.0"

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

新安装程序安装了旧版本的软件.在控制面板的程序和功能"(以前是添加/删除程序")中,它显示安装了 1.0.1 版.我看过不止一个教程,比如 http://www.simple-talk.com/dotnet/visual-studio/updates-to-setup-projects/

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:

  • 增加版本属性(见图 1).Visual Studio 显示一个消息框,提示您更改 ProductCode 和 PackageCode.选择是.
  • 将 RemovePreviousVersions 属性设置为 true.

将 RemovePreviousVersions 属性设置为 true 会在您安装新版本时从系统中删除以前版本的产品.由于产品由 ProductCode Guid 标识,因此更改 ProductCode 会创建一个新产品.也就是说,当您安装新产品时,旧产品会被卸载.

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.

如果我从控制面板手动删除 1.0.0,然后安装 1.0.1,那么程序运行时会正确显示v1.0.1".

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.

我在这里遗漏了什么?

推荐答案

意识到这是旧的,但我刚刚遇到了完全相同的问题.

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

我通过更新所有项目的程序集和文件版本解决了这个问题(而不是像我之前所做的那样只更新 exe).

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

这篇关于Visual Studio 安装项目不会升级到新程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆