How to override settings.settings variable by app.config variable

前端 未结 5 1787
攒了一身酷
攒了一身酷 2021-01-18 04:32

How can I change (or override) a settings.settings variable by adding a variable to the app.config on production?

Is this possible anyway?

5条回答
  •  不知归路
    2021-01-18 04:50

    It depends on the scope of the settings. If its an application scope setting changing its value in app.config is sufficient.

    However, if its a user scope setting then the value present in app.config is just the default used to new users and every user that already used the application will have the currently used value stored in a separate file, the user.config, so changing the value in app.config will have no effect to users that already run the application once.

    Due to this changing the value of an user scope setting can be a troublesome task. You can check the following answer for more information on changing a user scope setting:

    Changing User Scope Application Setting

提交回复
热议问题