0

Every time I try to rename my exe, he doesn't update the settings, but if I keep the same name works fine, how to solve this?

This is what I use for the update:

    if (Settings.Default.UpgradeRequired)
                {
                    Settings.Default.Upgrade();
                    Settings.Default.UpgradeRequired = false;
                    Settings.Default.Save();
                }
Pavel Anikhouski
  • 21,776
  • 12
  • 51
  • 66

1 Answers1

0

A different exe name is a different app, so the framework behavior is not made to handle that.

It can only handle version changing of same assembly (name).

What you can do is to create a hand-made application settings file, so it will be the same within your project no matter if you change the target exe name in the project properties if you set the store path to the same location:

How to create a hand-made application settings file

How to initialize user app data and document path

For example you can store it in UserAppData\Company\SomeFixedName\ or why not UserAppData\SomeFixedName\.