Visual Studio Setup Installer is not updating Old Config file during installer overwriting

Ketaki Nanaware 1 Reputation point
2021-10-04T12:56:22.497+00:00

I have created an installer setup through visual studio. Our solution has XML file which saves user settings related tools. The previous version is installed and old XML files are present. We did versioning for XML files so that new files get installed using installer overwriting. This works successfully.

We want to retain/copy old config file settings. How to achieve this.

One way we tried is to write down code in the Install function, but the previous installed version's Install function is getting called not the new exe's Install function. Below are functions we tried from Installer.cs class.

public override void Install(IDictionary stateSaver)
protected override void OnAfterInstall(IDictionary stateSaver)
protected override void OnBeforeInstall(IDictionary savedState)

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,578 questions
Visual Studio Setup
Visual Studio Setup
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Setup: The procedures involved in preparing a software program or application to operate within a computer or mobile device.
970 questions
{count} votes