WP7 Final Tools – App upgrade, no issues

Upgraded my app to the final bits today and had a few notes to share.

My Steps to Upgrade

  1. Create a new WP7 project (created a new project to make sure I didn’t miss out on any project overhead changes and skipped a merge)
  2. Copied my unit test project to the new solution folder, and added it to the solution
  3. Created a new SilverLight3 class library project for my data/domain logic
  4. Copied the data/domain logic to the new project
  5. Copied the phone app code to the project
  6. Copied the app.xaml and app.xaml.cs code to the new app.xaml/.cs
  7. Added missing references
  8. Replaced the SL3 Maps control with the new WP7 control
  9. Replaced the Codeplex Panorama control with the new WP7 control

Maps

  • Reference Microsoft.Phone.Controls.Maps instead of the SL3 map dll
  • I had been setting the CredentialsProvider for the map from my ViewModel with a ClientTokenCredentialsProvider property.  This type is not included in the new control library so I changed it to a string and pass the key directly to the map without wrapping it in a type. 
  • The Location class no longer takes latitude and longitude in the constructor, which is easily fixed with a property initializer
     image
    You can easily fix with a regex find/replace in VS:

    Find what – Location({.*},:b{.*})
    Replace with – Location { Latitude = 1, Longitude = 2 }

    image

Panorama Control

All I had to do for this was get rid of the old dll and replace with C:Program Files (x86)Microsoft SDKsWindows Phonev7.0LibrariesSilverlightMicrosoft.Phone.Controls.dll.  The new control works much better.   The old control was buggy for me.

Summary

The upgrade went surprisingly well.  All told it took me about 1 hour and I’m slow. 

Is anyone seeing issues with their upgrade?

Leave a Reply