I am going to create setup for my web project. I use http://blog.bartdemeyer.be/2013/10/create-an-installer-for-website-with-wix-part-1/ as my reference. In the middle of article, author create a file called WebSiteContent.wxs
using heat.exe:
<Target Name="Harvest">
<!-- Harvest all content of published result -->
<Exec
Command='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg MyWebWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
ContinueOnError="false"
WorkingDirectory="." />
</Target>
After runnig msbuild, file conitains following content:
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!--...-->
<Fragment>
<ComponentGroup Id="MyWebWebComponents">
<!--...-->
<Component Id="cmpCDB7F4EFDEF1E65C3B12BEBAD7E4D7EA" Directory="INSTALLFOLDER" Guid="{7EA5DB39-513D-482B-9FDC-2F16FCE5E712}">
<File Id="fil8994620207C22CA15AF75ACDD6420C79" KeyPath="yes" Source="$(var.publishDir)\Web.config" />
</Component>
</ComponentGroup>
<!--...-->
</Fragment>
</Wix>
I want to change value of web.config file content as described in Change XML node values from WiX but I don't know how to add reference outside of WebSiteContent.wxs file to fil8994620207C22CA15AF75ACDD6420C79 element.
I know I can add xml script to WebSiteContent.wxs file. But because in every build it will be cleaned, I don't want to change WebSiteContent.wxs file in every build.