我有一个标准的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:
安装项目可以很好地输出.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:
非常感谢您.
推荐答案升级的方法是使用RemovePreviousVersions项目设置.这些步骤是:
The way you do the upgrade is to use the RemovePreviousVersions project setting. The steps are:
生成的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]
这里有更长的解释: www.red-gate/simple-talk/dotnet/visual-studio/updates-to-setup-projects/?_ga=2.138201520.1662048302.1514485579-1682631157.1514485579
There's a longer explanation here: www.red-gate/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项目输出不会替换当前安装
发布评论