How to clear isolated storage

  • Thread starter Thread starter Andrus
  • Start date Start date
A

Andrus

WinForms .NET 3.5 application creates files using UserSettings.Store
object.

UserSettings.RemoveAll() does not remove those files.

Directory
C:\Users\user\AppData\Local\IsolatedStorage\kpfhj5go.0xp\drvowkmz.al1\Url.uxurxejkalg3optycd32sijndoeqvbiy\Url.4d3tujmqjjalo23wq4rjcu1tkcry2s2d\Files

still contains created files.

How to remove all files in code from isolated storage ?

Andrus.


public static class UserSettings
{
static IsolatedStorageFile Store
{
get
{
return IsolatedStorageFile.GetUserStoreForDomain();
//GetUserStoreForAssembly();
}
}

public static void RemoveAll()
{ // todo: explore why this does not delete isolated storage files:
Store.Remove();
IsolatedStorageFile.Remove(IsolatedStorageScope.Domain);
IsolatedStorageFile.Remove(IsolatedStorageScope.Machine);
IsolatedStorageFile.Remove(IsolatedStorageScope.Assembly);
IsolatedStorageFile.Remove(IsolatedStorageScope.Application);
}
}
 
Back
Top