I've an ASP.NET project, a WIX installer project for it, and a build file for the installer. The build file:
- Builds my project
- Publishes the website into a directory (
SetupFiles/publish/
) - The WIX's
heat.exe
'Harvest's the website's files - After that creates the installer with
candle.exe
andlight.exe
I'd like to modify one of the config files (the Web.Release.config
, which harvested from the SetupFiles/publish
directory) during the install. I found the following code for it:
<Component Id="ChangeConfig" Guid="[YOUR_GUID_HERE]">
<File Id="App.config" Name="MyApplication.exe.config" Vital="yes" KeyPath="yes" Source="[Path to project dir]\app.config" />
<util:XmlFile Id="AppConfigSetConnStr" Action="setValue" Permanent="yes" File="[#App.config]"
ElementPath="/configuration/connectionStrings/add[\[]@name='MyDatabaseName'[\]]" Name="connectionString"
Value="Your Connection string values here" />
</Component>
From this question.
My problem is, what should I write into the File's tag Source attribute? If I write SetupFiles/publish/Web.Release.config
, the light.exe gives the following error:
D:\Works\Employer\MyProject12345\trunk\Project.Setup\SetConfigFile.wxs(7): er
ror LGHT0204: ICE30: The target file 'cktmp8gm.con|Web.Release.config' is insta
lled in '[TARGETDIR]\Inetpub\Proje\' by two different components on an LFN syst
em: 'cmpA0B9415D5BC7EAB6CA7F504326ED1B32' and 'ChangeConfig'. This breaks compo
nent reference counting. [D:\Works\Employer\MyProject12345\trunk\Project.Setup\
setup.build]
If I write simply Web.Release.config
, the light.exe says it cannot find the file.
I tried [INSTALLDIR]/Web.Release.config
(the INSTALLDIR
is a variable in my setup project), but in this case the light.exe also says it cannot find the file.
Thanks for your help!