.NET MSI安装项目-覆盖以前的版本 [英] .NET MSI Install project - Overwrite previous version

查看:46
本文介绍了.NET MSI安装项目-覆盖以前的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个MSI安装程序项目,用于安装Windows服务.

I have an MSI installer project that installs a windows service.

我的版本编号方法最好由这篇文章描述:什么是AssemblyVersion,AssemblyFileVersion和AssemblyInformationalVersion之间有什么区别?

My version numbering method is best described by this post: What are differences between AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion?

我没有更改安装项目的版本,因为它没有更改,并且这样做有很多问题.

I am not changing the Version of my install project as that is not changing, and I've had too many issues when doing that.

我已经使用以下程序集版本安装了服务

I have already installed my service with the following assembly versions

[assembly: AssemblyVersion("4.3")]
[assembly: AssemblyFileVersion("4.3.0.0")]

我刚刚为此版本构建了一个MSI安装程序:

I just built an MSI installer to this version:

[assembly: AssemblyVersion("4.3")]
[assembly: AssemblyFileVersion("4.3.1.0")]

运行MSI时,它告诉我需要卸载以前的版本.

When I run the MSI it tells me that I need to uninstall the previous version.

我该如何解决?我最终想做的是:

How do I get around this? What I ultimately would like to do is:

  1. 安装MSI
  2. 安装(重新升级到)覆盖先前版本的另一个版本(提示或不提示)一个.我不想在安装更新之前先卸载.

我的安装程序项目属性为:

My installer project properties are:

RemovePreviousVersions-True

RemovePreviousVersions - True

InstallAllUsers-True

InstallAllUsers - True

DetectNewerInstalledVersion-错误

DetectNewerInstalledVersion - False

版本-4.3.0

我尝试过的事情:

  • 更新项目的程序集版本.但是,这会在添加删除程序"中创建同一产品的多个版本.不想我想要Windows服务
  • 在安装程序项目上更改版本号.但这会在尝试安装任何版本的MSI时产生很多错误.我什至收到警告,提示我正在网络驱动器上进行安装!(哇).

任何帮助都会令人振奋!

Any help would be rockin!

谢谢.

推荐答案

,在安装程序的安装项目属性中,您需要为每个版本增加"Version"属性,同时保持相同的UpgradeCode.

in the setup's setup project properties you need to increment the "Version" property for each version, while keeping the same UpgradeCode.

当您增加版本时,如果您要更改产品代码,则会提示您,请回答是".

When you increment the version it will prompt you if you want to change the ProductCode, Answer "Yes".

还必须具有用于删除先前版本和检测新版本的属性.

You must also have the properties for removing the previous version, and detecting new versions set to true.

这篇关于.NET MSI安装项目-覆盖以前的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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