I was wondering if anyone else has been using the experimental branch of Xamarin.Auth for Windows Phone support.
When I sign out from my app I am attempting to delete the account information stored with the following code:
public void SignOut()
{
var accountStore = AccountStore.Create();
var accounts = accountStore.FindAccountsForService(PreferenceStrings.LoginServiceId);
if (accounts.Count() == 0)
return;
foreach (var account in accounts)
{
accountStore.Delete(account, PreferenceStrings.LoginServiceId);
}
}
This crashes when it goes to Delete the Account. I've investigated this and the exception is that the file cannot be deleted as it is in use by another process. I'm not sure where would be using this file as I only access it through the Xamarin.Auth methods which as far as I can see should release the file after use.
My project is set for Windows Phone Silverlight 8.1.
Has anyone else run into this problem?