0

I am using the below code lifted from MSDN, but its not updating my app.config file. Am I missing something? Please help.

private void button1_Click(object sender, EventArgs e)
{
    Properties.Settings.Default.reliefPath = "reliefPath";
    Properties.Settings.Default.Save();
}

I am targeting .NET 2.0.

ahsteele
  • 26,243
  • 28
  • 134
  • 248
mhar
  • 47
  • 2
  • 10

2 Answers2

0

The app.config itself is never updated. Instead a copy is created in the isolated storage for your application. I believe it's under your profile's AppData\Roaming directory. That file is then loaded next time you run your application

Alec Bryte
  • 580
  • 1
  • 6
  • 18
0

The settings may be saved in your App Data folder, in a user.config file: Properties.Settings.Default.Save(); -> Where is that file

Community
  • 1
  • 1
Russell Uhl
  • 4,181
  • 2
  • 18
  • 28