2

After doing a:

MyApp.Properties.Settings.Default.Upgrade();

How can I remove any previous setting files? The problem I'm having is I have a function where the user can reset his/her own data using:

Properties.Settings.Default.Reset();

However on the next start of the application, since the old user settings are still there it will be upgraded again.

redshift5
  • 1,966
  • 1
  • 18
  • 27

2 Answers2

0

How do you keep user.config settings across different assembly versions in .net?
seems to be what you are looking for.

So use Upgrade, UpgradeRequired=true or false, and Save : it would be quite long to explain all cases, but it is in fact quite easy to figure out what to do.

Community
  • 1
  • 1
GameAlchemist
  • 18,995
  • 7
  • 36
  • 59
  • This doesn't solve the issue though, I'm already doing something similar in my application. The issue is when the _current_ settings are removed via Reset(), the previous settings will be upgraded again as there will be no record of Upgrade = false anymore. How can I totally remove the actual previous version setting files? – redshift5 Jan 29 '13 at 01:52
0

Looks like there is no way to do this other than doing it manually yourself. So after a successful upgrade, you can remove the old version manually using file system methods.

redshift5
  • 1,966
  • 1
  • 18
  • 27