locked
Sometime,all files under localstate are cleared. But when?

    Question

  • Sometime all files under LocalState of my developing app are cleared.

    The timing of that seems to be after creating apppackage, means when apppackage version was incremented ,but it's not sure.

    Files of remote machine aren't cleared on remote debug.

    Any info will be helpful.


    cyclops

    Friday, May 30, 2014 12:22 AM

All replies

  • Hi Cyclops,

    Should not be the problem of version increment, the localstate will be cleaned when uninstall the app, see this for more information: Accessing app data with the Windows Runtime

    I would suggest you to check your debug setting, you should uncheck the "uninstall and re-install the app" line.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Friday, May 30, 2014 7:05 AM
    Moderator
  • Hi Jamles,

    I've confirmed that debug setting is unchecked.

    I know the LocalState state will be cleaned when uninstall the app.

    It doesn't happen always,but sometime.

    While developing recently,I did often like below

    1.Change configuration to Debug or Release.

    2.Change deploy target to Local or Remote.

    3.Create app package to upload.

    If LocalState is never cleared except uninstalling app, something above cause uninstalling effect?


    cyclops

    Friday, May 30, 2014 12:07 PM
  • Changing configuration from Debug to Release -or- Release to Debug cleans the local storage.


    Wiki: wbswiki.com
    Website: www.wisenheimerbrainstorm.com

    Friday, May 30, 2014 12:41 PM
  • I tested it.
    Changing config from Debug to Release and from Release to Debug seems not to clear localState.

    cyclops

    Friday, May 30, 2014 4:01 PM
  • By "changing configuration" I mean selecting a different configuration and then rebuilding and running the app.

    These are the steps:

    1. Change the configuration from Release to Debug (or vice versa)

    2. Rebuild the solution.

    3. Run the app (at this moment the LocalState is wiped out).


    Wiki: wbswiki.com
    Website: www.wisenheimerbrainstorm.com

    Friday, May 30, 2014 7:39 PM
  • I tried this,but it didn't clear files under localstate.

    Instead of that,it seems that creation app package for uploading to store clears localstate, but still I'm not sure.


    cyclops

    Sunday, June 01, 2014 3:12 PM
  • Could you double check if there is some code for instance ClearAsync() | clearAsync() method will be fired with specific condition in your project to clean the file under localstate?

    Seems the configuration should not be the root cause of your issue. But I would like to know if you save the project just in local machine or you will sync with a TFS server something?

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Monday, June 02, 2014 6:45 AM
    Moderator
  • No, I didn't use such methods.

    I'm using VS Online. Is it affect?

    I will try to check creating app package is related to or not with locking some file under LocalState when I create package next time.


    cyclops

    Tuesday, June 03, 2014 8:23 AM
  • That's interesting, I'm not familiar with VS Online, but I would suggest you to give a try to build the project by local Visual Studio without sync with VS Online to see if the same thing happens.

    Furthermore I would like to know if you share the VS Online together with some friends or others, perhaps they modify the configuration of the project?

    Meanwhile I will create a VS Online project to see if I can reproduce the thing you mentioned.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Tuesday, June 03, 2014 9:01 AM
    Moderator