WiX Designer app.config

Add-in Express™ Support Service
That's what is more important than anything else

WiX Designer app.config
The system cannot find the file ...bin\x86\Release\\app.config 
Mads


Guest


Hi

The designer does not rename app.config to [applicationName].config?
When building a newly created project with one dll an a config file we get the error "The system cannot find the file '[path]\bin\x86\Release\\app.config'".
The app.config file exists and [applicationName].config is created.

This worked in the first projects created with first version of the wix designer.

--
Mads
Posted 01 Oct, 2014 08:21:34 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Mads,

When you add the PrimaryOutput of an .exe project to the WiX project via the 'File System' editor, the app.config file is added and renamed automatically.
Posted 01 Oct, 2014 13:15:05 Top
Mads


Guest


Hi

That?s the problem, the designer does not rename the file. The error is "The system cannot find the file '[path]\bin\x86\Release\\app.config'.

I have added one primary output in the file system editor, the output of the project is a dll not exe.

--
Mads
Posted 02 Oct, 2014 02:55:03 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Mads,

The designer is not responsible for renaming the config file. It should be done by the project what the config file is added for. The fact is that the Heat.exe tool of WiX doesn't extract config files from primary outputs for 'Class Library' based projects. It is supported for .exe and web app projects only. So you need to add the config file manually as a general file. To fix the issue with different configurations I would advise you to use wix variables as shown in the example below:

E.g.

<Component Id="comp_B6E87AC4_D1EE_4833_A3C6_02CE5B24B7C0" Guid="2784A69C-AB8C-40A7-B24A-152DBA490D3D" Permanent="no" SharedDllRefCount="no" Transitive="no">
<File Id="_A0DD6727_080F_4040_A6C1_4F5879BE1820" DiskId="1" Hidden="no" ReadOnly="no" TrueType="no" System="no" Vital="yes" Name="ClassLibrary1.dll.config" Source="$(var.ClassLibrary1.TargetDir)ClassLibrary1.dll.config" KeyPath="yes" />
</Component>
Posted 02 Oct, 2014 05:31:07 Top