0

When replacing a new copy of my application at the customer, the application properties settings are erased and must be specified again I searched a lot for a solution and couldn't find it please help

Max Sh
  • 9
  • 4

1 Answers1

0

You can use Properties.Settings.Default.SettingsUpgradeRequired variable to check for updates. If there is something new, use Properties.Settings.Default.Upgrade

if (Properties.Settings.Default.SettingsUpgradeRequired)
        {
            try
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.SettingsUpgradeRequired = false;
                Properties.Settings.Default.Save();
            }
            catch (Exception e)
            {                    
            }
        }
Preslav Tsenov
  • 163
  • 2
  • 9