如何让 Wix 在最终 MSI 中包含没有行的 CustomTable?如果我只是像这样定义表
<CustomTable Id="MyTable">
<Column Id="Id" Type="string" Category="Identifier" PrimaryKey="yes"/>
<Column Id="Root" Type="string"/>
<Column Id="Key" Type="string"/>
<Column Id="Name" Type="string"/>
</CustomTable>
Wix 在最终输出中忽略了它。
我的 DTF CustomAction 期望它在那里,以便它可以在执行期间向其中添加行。
有什么想法吗?
最佳答案
感谢此 blog post 中的评论(顺便说一下,它有一个非常有用的 DTF 自定义操作示例)我找到了 Wix EnsureTable元素,它确保一个表出现在输出中,即使它是空的。
所以为了让我的示例工作,我需要这样做:
<CustomTable Id="MyTable">
<Column Id="Id" Type="string" Category="Identifier" PrimaryKey="yes"/>
<Column Id="Root" Type="string"/>
<Column Id="Key" Type="string"/>
<Column Id="Name" Type="string"/>
</CustomTable>
<EnsureTable Id="MyTable"/>
关于wix - 如何在 Wix 中创建空的自定义表格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2639376/