所以我有一个基于 WIX 的部署项目。我注意到您可以在其中包含功能和文件。但是,如果选择了 DEV/QA 环境,我只想部署特定文件。如果他们选择生产,我希望它忽略这个特定文件。
.wxi 文件中是否有办法根据变量的特定值有条件地包含功能/目录和文件?
IE。我想要像下面这样的东西 - 可能是动态包含的 componentRef?(我已经清理了这些值)。
<Feature Id="MyApplication" Title="MyApp" Description="My Application" ConfigurableDirectory="MYAPP" Level="1">
<ComponentRef Id="AppEmailTemplatesDir" />
</Feature>
然后再往下
<Directory Id="EmailTemplatesDir" Name="EmailTemplates">
<Component Id="AppEmailTemplatesDir" Guid="{A-GUID}">
<File Id="EmailTemplate1.htm" Name="EmailTemplate1.htm" DiskId="1" Source="..\..\EmailTemplates\EmailTemplate1.htm" />
</Component>
</Directory>
有任何想法吗?我们确实有自定义操作代码(VB.NET),但我不确定除了编写代码以包含文件之外如何使用它。