I have a VB.NET project to which I have added a setup project in order to deploy it.

Deploying to the application folder I have the Primary Output of my project (which is the project.exe and project.exe.config files).

My problem is that when user install the latest release of my project, the setup procedure replaces all files including my project.exe.config file thereby losing the user's configuration settings (which I use to store the database connection string).

Obviously if I add new settings to the configuration file, I want those added to the user's config files when they upgrade. But I don't want all their existing settings replaced. Is there anyway to avoid this?