Where is the data for Properties.Settings.Default saved?

后端 未结 3 1072
谎友^
谎友^ 2020-12-13 02:34

In my WPF application, I click on Settings.settings in the Solution Explorer and enter a StringCollection variable with a User

3条回答
  •  不思量自难忘°
    2020-12-13 02:43

    Since you selected user scope, they are saved in each user profile directory, more specifically, inside the AppData folder of the user profile in a file named user.config.

    The full path is dependent of the application.

    In Windows 7 without roaming profile and with an Windows Forms Application named Example.Settings.CustomClass I'm getting the following folder:

    C:\Users\[user]\AppData\Local\Microsoft\Example.Settings.CustomCl_Url_3qoqzcgn1lbyw2zx3oz1o3rsw2anyjsn\1.0.0.0
    

    Also note that they are saved taking in consideration the version of your application and that the values stored in App.config are the default values used for a new user.

提交回复
热议问题