Win8 Metro - Reset Roaming & Local Settings?

I am trying to find a quick solution to clear / reset roaming settings. I have to do it manually in code and must have a development environment.

Is there a reset switch?

Any ideas?

+3


source to share


5 answers


The data is stored locally in %localappdata%\Packages\<packageID>

. You can remove it from the client right from there. For more information, see Accessing Application Data .



+3


source


Better late for the party, but never, but:

You can do this by right-clicking on your application in the solution explorer, choosing Properties, going to the Debug tab and clicking Uninstall and then reinstalling my package.



It should be at least nuclear stuff from LocalSettings, but I don't think it affects the Roaming stuff.

+2


source


That's what the function is [ApplicationData.current.clearAsync()][1]

for it - it will hide it anyway.

+2


source


It doesn't look like there is a way inside Visual Studio to do this, but there is a way to detect debug mode and also access files directly from Windows Explorer. Therefore, you have the following options:

  • Leave your code that dumps the datastore but detects debug mode by setting the Debug.debuggerEnabled property when your application starts. If you want to clean up everything I would recommend checking for a function clearAsync

    that will destroy your local data store for the application. For more information see this link .
  • @JPAlioto option suggested to manually empty the folder. You can do this as a build step quite easily.
0


source


Let's say you want to clear the 'someSetting' stored in localSettings. You can use:

var localSettings = Windows.Storage.ApplicationData.current.localSettings; localSettings.values.remove ("someSetting");

The same goes for roamingSettings I think.

0


source







All Articles