Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding multiple Web.config files in separate directories to WIX installer
    primarykey
    data
    text
    <p>I am creating a Wix installer package for my ASP.net application, but am getting an error when trying to add multiple Web.config files even though they are located in different directories.</p> <p>The code I have so far looks like this:</p> <pre><code>&lt;Directory Id="INSTALLLOCATION" Name="Site" &gt; &lt;Component Id="Web.Config" Guid="F9D6C6E5-887E-4D90-BDEB-5D16AAA8F194"&gt; &lt;File DiskId="1" KeyPath="yes" Source="$(var.SolutionDir)\publish\Web.config" /&gt; &lt;/Component&gt; &lt;Directory Id="Account.Dir" Name="Account"&gt; &lt;Component Id="Account.Web.Config" Guid="53FC1820-3ADD-41C0-92D6-9A66348C33A4"&gt; &lt;File DiskId="1" KeyPath="yes" Source="$(var.SolutionDir)\publish\Account\Web.config" /&gt; &lt;/Component&gt; &lt;/Directory&gt; &lt;/Directory&gt; &lt;Feature Id="DefaultFeature" ConfigurableDirectory="TARGETDIR" Level="1"&gt; &lt;ComponentRef Id="Web.Config"/&gt; &lt;ComponentRef Id="Account.Web.Config"/&gt; &lt;Feature&gt; </code></pre> <p>The error message I'm getting is: <code>"Duplicate symbol 'File:Web.config' found. This typically means that an Id is duplicated. Check to make sure all your identifiers of a given type (File, Component, Feature) are unique."</code></p> <p>As far as I know you can't install the same file twice using WIX, but these are different files in different locations that only have the same name. When I rename one of the files the installer works as expected but this doesn't help since both files need to be named Web.config. I don't think that the IDs or GUIDs are a problem since they are unique and changing the file name works.</p> <p>Does anyone have an ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload