I am going to be pushing out a new version of my app soon. Whilst the app brings new design, imagery and ads I also took the opportunity to update namespaces and some class names.
Towards the end of my update development I began worrying if data that had already been saved on the device would be compatible with the new code. The last thing I wanted was an unrecoverable crash after the update. After searching around I found this great article Debugging the Update Process for Windows Phone Apps from Doug Holland.
Doug’s a smart guy and he keeps a copy of his previous XAP submissions so that he can test older versions. I on the other hand am not so smart and did not have a copy, dammit! We changed source control provider recently so I couldn’t get from a particular Label either.
I thought all was lost as I could not see how I could get hold of a copy of the published XAP needed to follow’s Doug’s process. Then I found Phone7Market this allows the download and install of Free or Trial versions of published Marketplace apps.
So now I had a the published version of my app and my swanky new version. Unfortunately the version from Phone7Market is the signed version that has a separate product id. This means we cannot simply install it, use it and then try updating it as the Windows Phone Power Tools will not see the two apps as the same app. There is a workaround for this situation.
- Install the published version to the emulator\device using Phone7Market.
- Use the published version as much as is necessary to cause significant data to be stored in isolated storage.
- Using the power tools, connect to the emulator\device, switch to “file browser” view and “GET” the files onto your local machine
- Now deploy the swanky new version, use Visual Studio or whatever you find easier.
- You should now have two app nodes in the “file browser” view. One with a GUID name, that is your published one and one with the name of your app. That is the local debug version.
- With these two folder structures you can “PUT” the files that you “GOT” in step 3 into the IsolatedStorage node of the new debuggable version
- Start up your local app in debug mode and you can check what happens when your new codes tries to load old data files!"
Many thanks to Doug for his original article; to the Windows Phone Power Tools team and to the Phone7Market team. Really useful tools, seeing as it is Christmas I should probably go hit the “Donate” button