Settings.settings File Keeps Getting Reset

后端 未结 4 656
隐瞒了意图╮
隐瞒了意图╮ 2020-12-16 03:40

When debugging my project in Visual Studio 2008, my Settings.settings file keeps getting reset between builds. Is there a way to prevent this from happening?

Thank

4条回答
  •  我在风中等你
    2020-12-16 04:05

    I believe Settings.settings files are saved based on the current version number, basically as a "feature" where settings are not saved between differing versions of the same program on a machine. Assuming you're incrementing the version number automatically when compiling (1.0.* in AssemblyInfo.cs), you'll be resetting your settings everytime you compile a new version.

    To correct this, the best course would be to serialize your own settings file to the Application Data directory.

提交回复
热议问题