VS2017 Installer项目输出不会替换当前安装 [英] VS2017 Installer project output does not replace the current installation

查看:96
本文介绍了VS2017 Installer项目输出不会替换当前安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个标准的Windows窗体应用程序,正在使用VS2017安装程序项目进行部署.当使用文件系统"打开安装项目时,我在应用程序文件夹中添加了以下内容:

I have a standard windows forms application that is being deployed using the VS2017 setup project. When opening the setup project using the "File System", I added to the application folder the following:

  1. 胜利表格应用程序的主要输出.
  2. EPPlus库的dll.
  3. 一些Excel文件.
  1. Primary output from the win forms app.
  2. The EPPlus library's dll.
  3. Some excel files.

安装项目可以很好地输出.msi包.问题是,当我在构建安装程序项目(当然是在构建源项目之后)之后运行.msi输出并运行该应用程序时,我看不到我的更新,即使C:\Program Files ....目录上的文件也没有被修改.我尝试更改产品代码并增加版本,但是它不起作用.我的问题是:

The setup project gives the output .msi package just fine. The problem is, when I run the .msi output after building the setup project (of course after building the source project) and run the application, I do not see my updates, even the files on C:\Program Files .... directory are not modified. I tried changing the product code and the increasing the version and it does not work. My questions are:

  1. 除了再次删除并安装程序外,是否还可以使安装程序包实际更新软件的安装?
  2. 无论我更新多少软件,如何避免#1中的问题?
  3. 原因是什么,以及如何避免出现此错误已安装该产品的另一个版本"?我不确定我是怎么弹出的.
  4. 如果我希望源代码的某些部分位于单独的dll中,是否像添加类库项目并将其输出添加到安装项目一样简单?

非常感谢您.

推荐答案

升级的方法是使用RemovePreviousVersions项目设置.这些步骤是:

The way you do the upgrade is to use the RemovePreviousVersions project setting. The steps are:

  1. 增加设置项目的版本并接受更改,这将包括对ProductCode的更改.
  2. 确保将RemovePreviousVersions设置为true.
  3. UpgradeCode(设置项目属性)必须相同,因此请勿更改.
  4. 增加需要更新的二进制文件的文件版本(这是有关更新版本化二进制文件的标准规则).

生成的MSI将进行重大升级(使用Windows Installer术语)并升级旧版本,将其替换为新产品MSI.请注意,升级仅适用于相同的安装环境.每个人都不会升级我只是我",因此这将导致在程序和功能"中出现两个条目.进行安装以创建详细的日志并搜索敌人的FindRelatedProducts条目将告诉您是否找到了升级. msiexec/I [msi文件的路径]/l * vx [文本日志文件的路径]

The resulting MSI will do a major upgrade (in Windows Installer terminology) and upgrade the older version, replacing it with your new product MSI. Note that an upgrade will work only with the same context of install. An Everyone will not upgrade a Just me, so that will result in two entries in Programs and Features. Doing the install creating a verbose log and searching foe FindRelatedProducts entries will tell you if it found the upgrade or not. msiexec /I [path to msi file] /l*vx [path to a text log file]

这里有更长的解释: https://www.red-gate.com/simple-talk/dotnet/visual-studio/updates-to-setup-projects/?_ga=2.138201520.1662048302.1514485579-1682631157.1514485579

There's a longer explanation here: https://www.red-gate.com/simple-talk/dotnet/visual-studio/updates-to-setup-projects/?_ga=2.138201520.1662048302.1514485579-1682631157.1514485579

这是旧的但相关的.并没有提到更新二进制文件版本的要求(早期的VS安装项目不需要).

which is old but relevant. and doesn't mention the requirement to update binary file versions (it wasn't needed with early VS setup projects).

这篇关于VS2017 Installer项目输出不会替换当前安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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