当使用.NET中Settings.settings文件,其中是配置实际存储?实际、文件、NET、Settings

2023-09-02 11:49:30 作者:荒芜

在使用.NET中Settings.settings文件,其中是配置实际存储? 我想删除保存的设置返回到默认状态,但是找不到在哪里它的存储...任何想法?

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 it's stored... any ideas?

推荐答案

这取决于您选择的设置为用户范围或应用程序范围。

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

User范围设置存储在

User scope settings are stored in

C: Documents和Settings 用户名 本地设置应用数据 应用程序名

C:Documents and Settings username Local SettingsApplication Data ApplicationName

您可以读取/在运行时写出来。

You can read/write them at runtime.

[对于Vista和Windows 7中,文件夹是

[For Vista and Windows 7, folder is

C:用户 用户名 本地设置应用数据 应用程序名]

C:Users username Local SettingsApplication Data ApplicationName ]

适用范围设置保存在 AppName.exe.config ,然后他们只读在运行时。

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