Why are my application settings not getting persisted?

后端 未结 3 1698
不知归路
不知归路 2020-12-03 21:31

So I have some settings that are of the user scope, but for some reason, they are not being saved to the .exe.config file. I do the following:



        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-03 21:52

    All user scope settings saved under application data with within a folder which indicates the version of your application and the name.

    You can see these folders by clicking "synchronize" in your "application settings" dialog.

    In Vista generally:

    • c:\users[currentuser]\AppData\Local[CompanyName][AppName]\version
    • c:\users[currentuser]\AppData\Roaming[CompanyName][AppName]\version

    Done this way due to settings are related with current user and UAC. In Vista also you can see even the application-wide settings are not stored in the config file.

    [CompanyName] and [ProductName] comes from your Assembly Information settings.

提交回复
热议问题