【发布时间】:2011-12-09 20:48:10
【问题描述】:
我有两个特点:
<Feature Id='BaseProductFeatures' Title='Feature 1' Level='1'>
<ComponentRef Id='WebAppVDirComponent'/>
<ComponentRef Id='someVDirComponent'/>
<ComponentRef Id='anotherWCFVDirComponent'/>
<ComponentGroupRef Id='group_IMPORTFOLDERFILES'/>
<ComponentGroupRef Id='group_WINSERVERFILES'/>
</Feature>
<Feature Id='SMSGWFeature' Title='Feature 2' Level='2'>
<ComponentGroupRef Id='group_SMSGWWEBAPPFILES'/>
</Feature>
在安装之前,我使用自定义操作将 INSTALLLEVEL 更改为 2:
[CustomAction]
public static ActionResult ChangeInstallLevel(Session session) {
session["INSTALLLEVEL"] = "2";
return ActionResult.Success;
}
值已设置,但未安装功能 2 (SMSGWFeature)。这是为什么?我没有看到 ComponentGroupRef 中的任何组件 group_SMSGWWEBAPPFILES 安装在我希望看到它们的目录中。但是如果我将功能级别 2 (SMSGWFeature) 设置为 1,安装程序将工作。
【问题讨论】:
标签: c# windows installation wix windows-installer