Questions about .net application app.config file - Advanced Installer Community
paladzhang
Posts: 1
Joined: Fri Nov 15, 2013 7:39 pm

Questions about .net application app.config file

i had an application developed with visual studio and i built it in a MSI setup file by Advanced Installer free edition.
my application had a ***.config file that stores the database connectstring, db login username/pwd, etc.
the question is that each time i built an upgrade setup file by Advanced Installer with newer version, which would replace the ***.config file in the application folder(only the values has changed by the user and nodes with no change) and thus lost the existing user's specific configuration values stored in the ***.config file.
i wonder if there's some settings that can make the newer version setup file can leave the ***.config file with user's stored config values unless the ***.config file has its node structure changed?
thanks very much.
regards,
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Questions about .net application app.config file

Hi and welcome to our forums,

The correct solution in this case is to read the old XML file using the Advanced Installer XML locator and return the values read
in the same properties you are using to capture this info from the user, when it first installs the application.

This will make your new version to automatically migrate the connection credentials in the new config file.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”