在我的安装程序中,我有两个可选功能,即同一软件的版本5和6的插件.它们将相同的文件(相同名称,相同的二进制内容)安装到应用程序的“plugins”文件夹中.
但是我有以下错误:
C:\Users\FooBar\Documents\project\project.wxs(281) : error
LGHT0204 : ICE30: The target file ‘0egx-0x3.dll|appv5plugin.dll’ is
installed in ‘[TARGETDIR]\plugins\’ by two different components on an
LFN system: ‘Comp_ThisAppV5_plugin’ and
‘Comp_ThisAppV6_plugin’. This breaks component reference counting.
我试过了:
>使用相同的文件,两个组件都将其用作Source
>将文件复制到两个项目子文件夹中,每个子组件一个
但是,静止,WiX拒绝建立.
wxs文件详细信息:
<Property Id="PROP_APPV5PATH"> <RegistrySearch Id='RegSearch_AppV5Path' Type='raw' Root='HKLM' Key='SOFTWARE\TheCompany\TheApp\5.0' Name='Installdir' Win64="yes"/> </Property> <Property Id="PROP_APPV6PATH"> <RegistrySearch Id='RegSearch_3AppV6Path' Type='raw' Root='HKLM' Key='SOFTWARE\TheCompany\TheApp\6.0' Name='Installdir' Win64="yes"/> </Property>
>单独的组件:
<Directory Id="DIR_APPV5"> <Directory Id="Dir_AppV5Plugins" Name="plugins"> <Component Id="Comp_ThisAppV5_plugin" Guid="*"> <File Id="appv5plugin_dll" Source="files\plugins\appv5\app_plugin.dll" KeyPath="yes"/> </Component> </Directory> </Directory> <Directory Id="DIR_APPV6"> <Directory Id="Dir_AppV6Plugins" Name="plugins"> <Component Id="Comp_ThisAppV6_plugin" Guid="*"> <File Id="appv6plugin_dll" Source="files\plugins\appv6\app_plugin.dll" KeyPath="yes"/> </Component> </Directory> </Directory>
>两个安装目录:
<SetDirectory Id="DIR_APPV5" Value="[PROP_APPV5PATH]" /> <SetDirectory Id="DIR_APPV6" Value="[PROP_APPV6PATH]" />
>两个独立的功能
<Feature Id="Feat_ThisAppV5_plugin" Title="Plugin for App V5" ConfigurableDirectory="DIR_APPV5" Level="1000" AllowAdvertise='no' InstallDefault='local' Absent='allow'> <ComponentRef Id="Comp_ThisAppV5_plugin"/> </Feature> <Feature Id="Feat_ThisAppV6_plugin" Title="Plugin for App V6" ConfigurableDirectory="DIR_APPV6" Level="1000" AllowAdvertise='no' InstallDefault='local' Absent='allow'> <ComponentRef Id="Comp_ThisAppV6_plugin"/> </Feature>