Question IsolatedStorage with ClickOnce update

JezB

New member
Joined
Sep 10, 2016
Messages
1
Programming Experience
10+
I'm trying to use a persistent application|machine storage area for an application that is deployed by clickonce or msi installer. But every time the app is updated thru clickonce, it is not using the old storage but creating a new one instead.

C#:
    [IsolatedStorageFilePermission(SecurityAction.Demand, UserQuota = 1024, UsageAllowed = IsolatedStorageContainment.ApplicationIsolationByMachine)]
    public static class AppStorageMachine
    {
        private static IsolatedStorageFile getStore()
        {
                IsolatedStorageFile isoStore;
                if (AppDomain.CurrentDomain.ActivationContext != null)
                {
                    // ClickOnce
                    isoStore = IsolatedStorageFile.GetMachineStoreForApplication();
                }
                else
                {
                    isoStore = IsolatedStorageFile.GetMachineStoreForAssembly();
                }
                return isoStore;
        }
        :

What am I missing? I'm following all advice I can find on this problem, using the application level scope is usually marked as the answer, but it's not working for me when deployed via ClickOnce on Windows 10. Does it rely on the application being signed? because mine isn't.
 
Last edited:
Back
Top Bottom