0

My wpf app has a config file which the user can edit from within the program and save it. Once I stop the debugging and start the program again the file is resetted to its old original state. I have a feeling that the file gets overwritten when the app gets built but I don't know how I would fix that.

Thanks in advance for any help.

Clemens
  • 123,504
  • 12
  • 155
  • 268
  • oh and I marked to config file as "Copy always" – Stephan Pillhofer Jan 25 '19 at 09:35
  • Incomplete - how and esp. where do you save that file? You shouldn't write to Program Files. – H H Jan 25 '19 at 10:12
  • Editable setting should have `User` scope, not `Application`, and are stored in a separate file. See [How To: Write User Settings at Run Time with C#](https://learn.microsoft.com/en-us/dotnet/framework/winforms/advanced/how-to-write-user-settings-at-run-time-with-csharp) – Clemens Jan 25 '19 at 12:00

0 Answers0