Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InstallShield VStudio project is installing app.config file instead of merged MyApp.exe.config

Using a InstallScript C# .Net Wizard to connect to a WinForms solution where I used the dependency scanner to identify project outputs.

The install package is copying the un-merged app.config file to the target directory instead of the solutions merged MyApp.exe.config file. This results in a executable that does not properly pickup configuration file settings not only because the file isn't named correctly but it also does not merge in target environment settings (ie. release, debug, etc.).

How do you have the Installer copy the merged MyApp.exe.config file to the Install Directory?

like image 551
roderickprince Avatar asked Aug 31 '25 18:08

roderickprince


1 Answers

Try this, I believe this should work.

Select the config file, and in the Copy to Output Directory under File.Properties, choose Copy always or Copy if newer. You can choose any file you like with this method. Basically this file will be placed to a directory where the binaries are built. This is still a better method than configuring/fixing from InstallShield, I think. I will like to hear from you, if you disagree.

Another thing, a config file is used and determined at run-time by code. That’s probably the reason why InstallShield does not know the file dependency on it. And it is out of scope for that tool.

Have fun and let me know what happens.

Tommy Kwee

like image 98
The Original Android Avatar answered Sep 04 '25 07:09

The Original Android