我们使用wix来创建我们的设置.对于升级,我们使用主要升级,如Rob Mensching的回答所示.(在较新的wix版本中,您可以使用MajorUpgrade元素.)这通常很有效.删除旧产品,然后安装新产品.
但是,显然上述内容并不完全等同于手动卸载旧产品然后手动安装新产品.
考虑例如以下场景:
显然,使用上面链接的wix升级逻辑,从1.1版升级到1.2时,3rdparty dll将消失.修复是必要的,以恢复它.
还有另一种升级方式,这适用于这种情况吗?我想我正在寻找的是升级逻辑,它允许降级组件,其行为就像手动卸载旧产品然后手动安装新产品一样.
我会根据目录(用于Web应用程序)自动为安装程序生成WiX文件,其中包含对以下3个.Net程序集的引用:
这是生成WiX片段:
<Fragment>
<DirectoryRef Id="bin">
<Component Id="bin.Migrator.dll" Guid="*">
<File Id="bin.Migrator.dll" Name="Migrator.dll" KeyPath="yes" Source="..\WebApplication\bin\Migrator.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="bin">
<Component Id="bin.Migrator.Framework.dll" Guid="*">
<File Id="bin.Migrator.Framework.dll" Name="Migrator.Framework.dll" KeyPath="yes" Source="..\WebApplication\bin\Migrator.Framework.dll" />
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="bin">
<Component Id="bin.Migrator.Providers.dll" Guid="*">
<File Id="bin.Migrator.Providers.dll" Name="Migrator.Providers.dll" KeyPath="yes" Source="..\WebApplication\bin\Migrator.Providers.dll" />
</Component>
</DirectoryRef>
</Fragment>
Run Code Online (Sandbox Code Playgroud)
我们使用相同的基本安装程序结构已有一年左右的时间,但是最近我们将Migrator.Net库更新为新的内部版本,该版本的版本号和程序集标题/描述属性从(从Orca倾销)更改为
升级库后,要: …