When using a Settings.settings file in .NET, where is the config actually stored?

后端 未结 10 763
予麋鹿
予麋鹿 2020-11-29 16:03

When using a Settings.settings file in .NET, where is the config actually stored? I want to delete the saved settings to go back to the default state, but can\'t find where

10条回答
  •  旧巷少年郎
    2020-11-29 17:08

    It depends on whether the setting you have chosen is at "User" scope or "Application" scope.

    User scope

    User scope settings are stored in

    C:\Documents and Settings\ username \Local Settings\Application Data\ ApplicationName

    You can read/write them at runtime.

    For Vista and Windows 7, folder is

    C:\Users\ username \AppData\Local\ ApplicationName

    or

    C:\Users\ username \AppData\Roaming\ ApplicationName

    Application scope

    Application scope settings are saved in AppName.exe.config and they are readonly at runtime.

提交回复
热议问题