I use wix 3.5 for install project. I have a file which can be installed as service or as file. I try to make it like this:
<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>
But error was throw Duplicate symbol 'File:AdminToolsConsoleFile' found.
How can I bypass this problem?
UPD: Feature code:
<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>