找到Wix重复符号'文件:AdminToolsConsoleFile'

时间:2017-08-18 09:30:42

标签: wix windows-installer installer

我使用wix 3.5进行安装项目。我有一个文件,可以作为服务或文件安装。我试着这样做:

<Component Id="MyProgrammAsService" Guid="*">
    <File Id="MyFile" Name="File.exe" DiskId="1" Source="$(var.SourceDir)\MyFile.exe" />
    <ServiceInstall ...
      </ServiceInstall>                        
      </RegistryKey>
  </Component>
<Component Id="MyProgrammWithoutService" Guid="*">
   <File Id="MyFile" Name="File.exe" DiskId="1" Source="$(var.SourceDir)\MyFile.exe" />
</Component>

但错误是抛出Duplicate symbol 'File:AdminToolsConsoleFile' found.我该如何绕过这个问题?

UPD: 功能代码:

  <Feature>
       <ComponentRef Id="SyncWithoutService" />
       <Feature Id="MyProgrammAsServiceFeature" Level="100" 
                Description="Install as service" 
                Title="Register as service" AllowAdvertise="no">
                <ComponentRef Id="MyProgrammAsService" />
       </Feature>
       <ComponentGroupRef Id="MyGroup"  />
  </Feature>

0 个答案:

没有答案