开发者

How do you test Windows Phone 7 app upgrades?

Version 1.5 of my Windows Phone app uses Version 1 of a 3rd party Isolated Storage library. I Version 2 of th开发者_如何学Gois library has performance improvements and bug fixes. I would like to upgrade my app (make it Version 1.6) to the new version but would like to test that data is not lost during upgrade.

I deployed version 1.5 to the phone and when I deploy version 1.6 from VS2010, the previous app and data are lost. My app is not upgraded but simply replaced.

How to I test the upgrade?

Thanks


You should deploy from within Visual Studio after rebuilding the xap, not using the xapdeploy tool - see this article for an example:http://gusperez.com/wp/2010/12/22/update-testing-your-windows-phone-7-apps/


I'm guessing that you have 2 separate project which each have the same ProductID (in WMAppManifest.xml). This would explain why the first app is being uninstalled when the second app is deployed.

I'd test this by manually setting the contents of Isolated on the first run of the new version of the app.
There are 2 approaches you can take:
- Manually set the contents of the files in IS (either in code or during debug)
- Use a tool like Isolated Storage Explorer


I would probably do something like:

  1. You can use Isolated Storage Explorer Tool (ISETool) to copy the isolated storage files from your old version into a directory (which you would commit to source control).

  2. Create a Build Configuration called "Debug - Upgrade from 1.5"

  3. Define a Post-Build Event that copies the data from the 1.5 backup directory to the emulator (it will need to be running; you may want to create a separate command line that starts the emulator)

Now you should be able to just hit F5 (after the emulator is already running) to test your upgrade over and over.

(Ideally, if Visual Studio used MSBuild to do the Deployments to the emulator/phone, we could simply hook into that process and update the IS after deployment but before execution. Sadly, that is not the case)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜