简体   繁体   中英

How to get to data stored locally with a Universal Windows App

I have an existing Universal Windows App built using Visual Studio 2015 RC deployed to my Windows 10 Mobile OS (build 10166). The app saves data locally in the folder returned by

Windows.Storage.ApplicationData.Current.LocalFolder

I tried deploying the solution several times and I know that the app keeps the local data even when a new version is redeployed from Visual Studio. I was planning on adding functionality to extract the data from the app later, knowing that redeploying a new version doesn't destroy the saved data.

So I started using the app and now I have quite a lot of valuable data saved in its local folder.

However, I upgraded Visual Studio 2015 to RTM version and now it says that the solution is not compatible. MS proposes to create a new solution and copy the code to the new solution. The problem is that if I do that, I'm going to end up with a new app on my phone that will not have any of my old data (which are saved in the local folder of the original app).

Does anybody have an idea how I can get to my data (without downgrading VS back to RC, if that's even possible {I can't find the download of VS2015RC anywhere anymore}). Thanks.

The only way I know to get the data off a phone is through the windows phone power tools. The problem is, currently this only supported through visual studio 2013 so you will need to install visual studio 2013. Install the powertool for windows phone. Then you will be able to get the data off.

https://wptools.codeplex.com/

It is best to install visual studio 2013 on test laptop if you have one... I have seen situations where visual studio 2013 and 2015 do not always play nicely together when in comes to installing of the HPV virtual phone machines.

I think you can solve it by updating the target platform. When you open the solution i VS2015 right click the project and select Edit xxx.csproj .

在此处输入图片说明

Then change the TargetPlatformVersion and TargetPlatformMinVersion to 10240 .

在此处输入图片说明

You will not be able to run the sample on the phone though, unless you update to the most recent Insider Build (10.0.10512.0). Otherwise VS will complain that the OS version on the phone is too old.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM