UWP App LocalSettings

2.8k views Asked by At

I'm developing an application for the UWP platform. I'm storing some settings along with the application and thinking what happends after I restart the application or the device itself.

Where are LocalSettings actually stored?

  • System Registry
  • File system
  • Memory (RAM)

And what's the difference between LocalSettings and RoamingSettings?


LocalSettings on Microsoft Docs

RoamingSettings on Microsoft Docs

2

There are 2 answers

0
aPlutonicCoder On BEST ANSWER

According to this article, RoamingSettings are used when more than one Windows device need the same settings. Therefore, you need to be online in order to access the data, which means it is stored outside of the device.

On the other hand, LocalSettings are only accessible in one device, so they are stored in the file system, tied to the application, which makes them inappropriate to store user data.

I reccomend you read this Microsoft link. This should include everything you need in onder to achieve what you are after.

0
Sean O'Neil On

They're stored in a file called 'settings.dat' in a folder called 'Settings' that's inside your app package folder.

c:\Users\yourusername\AppData\Local\Packages\YourAppName-AppId\Settings\settings.dat