wix - WiX排除特定文件夹下的某些文件或某些文件类型?
问题描述
我已经使用“HeatDirectory”来收集所有文件。但我需要删除“bin”文件夹下的所有(*.xml 和 *.pdb)文件。
我可以删除具有任何扩展名的单个文件。但是,如何删除特定文件夹下的某些文件或某些文件类型?
下面是我用来根据扩展名删除文件的 XSLT。
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<xsl:template match="@*|*">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="*" />
</xsl:copy>
</xsl:template>
<xsl:output method="xml" indent="yes" />
<xsl:key name="RemoveGlobal.asax.cs"
match="wix:Component[contains(wix:File/@Source, 'Global.asax.cs')]" use="@Id"
/>
<xsl:key name="RemoveCsproj" match="wix:Component[contains(wix:File/@Source,
'.csproj')]" use="@Id" />
<xsl:template match="*[self::wix:Component or self::wix:ComponentRef]
[key('RemoveGlobal.asax.cs', @Id)]" />
<xsl:template match="*[self::wix:Component or self::wix:ComponentRef]
[key('RemoveCsproj', @Id)]" />
</xsl:stylesheet>
解决方案
推荐阅读
- error-handling - SteamCMD - 更新作业后应用程序状态为 0x602
- javascript - knex.js 查询“承诺”何时执行/解决?
- python - 尽管以下两个函数的时间复杂度似乎相似,但为什么性能却存在巨大差异?
- tcp - 如何确定我是否需要来自 Rust io::Error 的新 TCP 连接?
- php - Stripe/Laravel - 更新条带客户导致 GET 方法错误
- react-native - 为什么我的标题的背景颜色不适用?
- sql-server - 如何将列值显示为行并将数据与其他表连接?
- tensorflow - 关于如何在 TPU 云上运行自定义 keras 代码
- json - JOLT 规范 - 将数组转置为类
- android - 为什么我的 android 主屏幕小部件变慢?