locked
Where does my applications preferences.xml file go? RRS feed

  • Question

  • I need a location that permanent, that's easily accessible to my application. The following doesn't work because the LocalFolder location gets deleted/recreated on every run.

    _preferencesFolder = ApplicationData.Current.LocalFolder;


    Randy

    Thursday, October 31, 2013 8:26 PM

Answers

  • LocalFolder (or RoamingFolder) is a good spot. It only gets removed if the app is uninstalled, not on every run.

    Check your project settings to make sure you don't have it set to uninstall when rebuilding.

    --Rob

    Thursday, October 31, 2013 9:16 PM
    Moderator

All replies

  • LocalFolder (or RoamingFolder) is a good spot. It only gets removed if the app is uninstalled, not on every run.

    Check your project settings to make sure you don't have it set to uninstall when rebuilding.

    --Rob

    Thursday, October 31, 2013 9:16 PM
    Moderator
  • I found the following Checkbox in the startup project, which is a Windows Store App project in my Visual Studio 2012 solution:

    Project Properties -> Debug tab -> Uninstall and then re-install my package. All information about the application state is deleted

    Unchecking this (which was checked by default) fixed the problem.

    Thanks!


    Randy

    Friday, November 1, 2013 11:59 AM