Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage files with same name in Wix?

Tags:

wix

wix3.5

I have some dll compiled either in .Net3.5 or in .Net4.0. (They have the same name)
In wix, I have 2 conditionals features.
Feature A installs .net3.5 dll of my app with ComponentRef Id="Cmp35"
Feature B installs .net4.0 dll with ComponentRef Id="Cmp40"
Features are mutually exclusives, only one feature 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 an error during the compilation: error LGHT0204: ICE30: The target file ... is installed in ... by two different components on an LFN system:
It seems I have an issue because the filenames are the same...
Is there a way to manage this? thanks!

like image 994
Steph Ragazzi Avatar asked Mar 20 '13 15:03

Steph Ragazzi


People also ask

Can you upload a folder to Wix?

In short, yes – you can easily upload a folder to Wix! Just open up the editor, click on the “Add” button, and select the “Folder” option from the drop-down menu. Then navigate to the desired folder on your computer and select it. Click on the “Open” button and it will be uploaded to your site.


2 Answers

Those are just warnings from ICE30. If you verified that the Components are truly mutually exclusive then you can ignore the warnings because you did what they told you to. :)

like image 85
Rob Mensching Avatar answered Oct 17 '22 09:10

Rob Mensching


I typically get around ICE30 warnings by installing the files to different subdirectories and then using a CopyFile element (DuplicateFile table) to clone the file to the desired directory. This works well when your features or components are mutually exclusive and you want ICE to be quiet.

like image 32
Christopher Painter Avatar answered Oct 17 '22 08:10

Christopher Painter