可以在一个 chunk 中表达多个自定义标签修饰符,使该 chunk 仅在包含这两个标签的 Features 都启用时才安装。通过使用 # 符号将两个标签连接起来来实现。Chunk 8000 仅在同时存在包含 campaign 标签的活动特性以及包含 hd 标签的活动特性时才会安装。如果用户卸载 campaign Feature 或 HD Texture Feature,Chunk 8000 将随所移除的 Feature 中所含标签相关的 chunk 一并移除。
<Features> <Feature Id="campaign_feature_id" DisplayName="Campaign" Tags="campaign"/> <Feature Id="hd_feature_id" DisplayName="HD Textures" Tags="hd"/></Features><Chunk Id="8000" Tags="campaign#hd"> <!-- This chunk is only installed if both the Campaign and HD Textures Features are active --><Chunk Id="8001" Tags="campaign"><Chunk Id="8002" Tags="hd"><Chunk Id="8003" Tags="campaign;hd"> <!-- This chunk is only installed if either the Campaign or the HD Textures Features are active -->