How to manage files with the same name in Wix?

I have a dll compiled in either .Net3.5 or .Net4.0. (They have the same name)
On wix, I have 2 conditional objects.
Function A sets the DLL.net3.5 of my application with ComponentRef Id = "Cmp35"
Function B sets the DLL.net4.0 with ComponentRef Id = "Cmp40"
The functions are mutually exclusive, only one function is installed.

my components:

<?xml version="1.0" encoding="UTF-8"?>  
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">  
    <Fragment>  
        <DirectoryRef Id="INSTALLDIR">  
            <Component Id="Cmp35" Guid="..">  
                <File Id="Behaviors.Assembly" Name="$(var.Behaviors.v3.5.gen.TargetFileName)" Source="$(var.Behaviors.v3.5.gen.TargetPath)" />  
               <File Id="Other.Assembly" Name="$(var.Other.v3.5.gen.TargetFileName)" Source="$(var.Other.v3.5.gen.TargetPath)" />  
           </Component>  
           <Component Id="Cmp40" Guid="...">  
               <File Id="Behaviors.Assembly.4.0" Name="$(var.Behaviors.v4.0.gen.TargetFileName)" Source="$(var.Behaviors.v4.0.gen.TargetPath)" />  
               <File Id="Other.Assembly.4.0" Name="$(var.Other.v4.0.gen.TargetFileName)" Source="$(var.Other.v4.0.gen.TargetPath)" />  
           </Component>  
       </DirectoryRef>  
    </Fragment>  
</Wix>

I have a compile time error: error LGHT0204: ICE30: target file ... set to ... by two different components on the LFN system:
It seems I have a problem because the file names are the same ...
Is there a way to handle this ? thank!

+5
2

ICE30. , , , , .:)

+7

ICE30, , CopyFile ( DuplicateFile), . , , , ICE .

+4

All Articles