WiX:在没有CustomAction的情况下从片段拉入CustomTable [英] WiX: pulling in a CustomTable from a Fragment WITHOUT a CustomAction

查看:138
本文介绍了WiX:在没有CustomAction的情况下从片段拉入CustomTable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在< Fragment> 中定义了一个自定义表格,我想链接到主要的 .wxs 文件。我的问题类似于这个问题,但我的片段没有< CustomAction> 标记来引用,并且没有< CustomTableRef> 标签可用于主要文件。

I have a custom table defined in a <Fragment> that I want to link into the main .wxs file. My question is similar to this question, but my fragment does not have a <CustomAction> tag to refer to, and there is no <CustomTableRef> tag to use in the main file.

拉入< Fragment> 的唯一方法是没有< ... Ref> 能够标记注入 可以是 Ref 'd ? - 例如具有never-install条件的< Component> 或永远不会被调度的< CustomAction> 运行(或者做一些完全良性的事情,比如设置属性 Foo )?

Is the only way to pull in a <Fragment> that does not have a <...Ref>able tag to inject a dummy tag that can be Ref'd? -- e.g. a <Component> with a "never-install" condition, or a <CustomAction> that never gets scheduled to run (or does something totally benign like setting property Foo to "")?

我正在寻找推荐的最佳做法。谢谢!

I am looking for a recommended best practice. Thanks!

推荐答案

在您的片段中,您可以创建如下所示的属性:

In your fragment you can create a property like so:

<Property Id="IncludeMyFragment" Value="1" />

然后在您的源代码中引用该片段,如下所示:

Then reference that fragment in your source like so:

<PropertyRef Id="IncludeMyFragment"/>

这应该拉入片段的内容。

That should pull in the contents of the fragment.

这篇关于WiX:在没有CustomAction的情况下从片段拉入CustomTable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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