When I create a Windows Installer package (say using WiX) and I install the application App.exe
as well as the App.exe.config
should the config file have its own component or should it be a companion file to the application executable?
<Component Id="C.App.exe">
<File Source="App.exe"/>
</Component>
<Component Id="C.App.exe.config">
<File Source="App.exe.config"/>
</Component>
versus
<Component Id="C.App.exe" Guid="PUT-GUID-HERE">
<File Id="F.App.exe" Source="App.exe"/>
<File Source="App.exe.config" CompanionFile="F.App.exe"/>
</Component>
If I install different App.exe.config
files depending on some external property (say run-time environment like test or release) does that affect what choice I should make?