Wix-替代补丁不';我什么也不做
我已经看到很多像这样的问题被问得到处都是,但我没有发现一个与我的特殊扭曲有关的问题已经得到了回答。建造小型升级 是一个与我的场景非常相似的示例,除了最后一部分Wix-替代补丁不';我什么也不做,wix,patch,wix3.8,Wix,Patch,Wix3.8,我已经看到很多像这样的问题被问得到处都是,但我没有发现一个与我的特殊扭曲有关的问题已经得到了回答。建造小型升级 是一个与我的场景非常相似的示例,除了最后一部分 我有一个产品,我为它构建了一个RTM msi文件,我们称它为product-1.0.msi 包含一个.dll 然后我构建了一个名为Product-1.0.1.msp的补丁,它使用Product-1.0作为基线 添加B.dll 然后我构建了一个名为Product-1.0.2.msp的补丁,它也使用Product-1.0作为基线
- 我有一个产品,我为它构建了一个RTM msi文件,我们称它为product-1.0.msi
- 包含一个.dll
- 然后我构建了一个名为Product-1.0.1.msp的补丁,它使用Product-1.0作为基线
- 添加B.dll
- 然后我构建了一个名为Product-1.0.2.msp的补丁,它也使用Product-1.0作为基线
- 添加B.dll+C.dll
- 1.0->1.0.1运行良好
- 1.0->1.0.2运行良好
- 1.0->1.0.1->1.0.2不起作用
升级代码保持不变 以下是Patch.wxs的内容:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Patch MinorUpdateTargetRTM="yes"
AllowRemoval="yes"
Manufacturer="{Manufacturer}"
DisplayName="{ProductName} {Version} Patch"
Description="{ProductName} {Version} Patch"
Classification="Update"
TargetProductName="{ProductName}" >
<Media Id="5000" Cabinet="Patch.cab" EmbedCab="yes">
<PatchBaseline Id="RTM">
<Validate ProductVersionOperator="LesserOrEqual" ProductId="yes" UpgradeCode="yes" ProductVersion="Update" />
</PatchBaseline>
</Media>
<PatchFamilyRef Id="PatchFamily"/>
</Patch>
<Fragment>
<PatchFamily Id='PatchFamily' Version='{Version}' Supersede='yes'>
</PatchFamily>
</Fragment>
</Wix>
在这个代码段中,{Version}在第一个补丁中是1.0.1,在第二个补丁中是1.0.2。否则,它们是相同的
对此有何想法?我终于让它工作了,以下是我的发现。 首先,。
我发现两个问题都导致了相同的行为 我发现的第一条线索是MSI日志中的以下两个片段: 1.0.1安装:
MSI (s) (A4:60) [09:42:30:917]: SELMGR: New components have been added to feature 'ProductFeature'
MSI (s) (A4:60) [09:42:30:918]: SELMGR: Component 'comp_F8F80909F3D340B19A4CF3E6E172F386' is a new component added to feature 'ProductFeature'
....
MSI (s) (A4:60) [09:42:33:077]: Executing op: ComponentRegister(ComponentId={B49318A5-8DDE-449F-9B77-B67A3F7F8952},KeyPath=C:\[...]\B.dll,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
MSI (s) (A4:70) [09:47:02:508]: SELMGR: ComponentId '{B49318A5-8DDE-449F-9B77-B67A3F7F8952}' is registered to feature 'ProductFeature', but is not present in the Component table. Removal of components from a feature is not supported!
MSI (s) (A4:70) [09:47:02:508]: SELMGR: Removal of a component from a feature is not supported
这是在修补程序中添加的新文件(B.dll)
1.0.2安装:
MSI (s) (A4:60) [09:42:30:917]: SELMGR: New components have been added to feature 'ProductFeature'
MSI (s) (A4:60) [09:42:30:918]: SELMGR: Component 'comp_F8F80909F3D340B19A4CF3E6E172F386' is a new component added to feature 'ProductFeature'
....
MSI (s) (A4:60) [09:42:33:077]: Executing op: ComponentRegister(ComponentId={B49318A5-8DDE-449F-9B77-B67A3F7F8952},KeyPath=C:\[...]\B.dll,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0)
MSI (s) (A4:70) [09:47:02:508]: SELMGR: ComponentId '{B49318A5-8DDE-449F-9B77-B67A3F7F8952}' is registered to feature 'ProductFeature', but is not present in the Component table. Removal of components from a feature is not supported!
MSI (s) (A4:70) [09:47:02:508]: SELMGR: Removal of a component from a feature is not supported
恐怕原因很简单,有点尴尬。B.dll被标记了一个新的组件Id。出于某种原因,安装程序(直接运行msi/msp)没有说明错误,只是简单地放弃了,而是让应用程序注册,就好像它处于升级状态(ARP中的1.0.2)
因此,我在这里给您的提示是:区分生成的片段,并确保来自基线的任何新文件在两个patch.wxs文件中都显示相同的组件和文件ID!即使你已经认为你知道他们知道
第二个问题是,我想使用以下方式捆绑.Net:
问题是,我尝试在断开连接的系统上安装,并将redist安装程序放在捆绑包中,而不是可执行捆绑包的“redist”子文件夹中。同样,安装程序只是放弃了,让应用程序处于(错误的)升级状态,即使.Net已经安装。这真的不应该发生,特别是因为.Net是一个prereq,所以我可能对包做了其他一些事情,阻止它在出现错误时按应有的方式运行