Upgraded my app to the final bits today and had a few notes to share.
My Steps to Upgrade
- 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)
- Copied my unit test project to the new solution folder, and added it to the solution
- Created a new SilverLight3 class library project for my data/domain logic
- Copied the data/domain logic to the new project
- Copied the phone app code to the project
- Copied the app.xaml and app.xaml.cs code to the new app.xaml/.cs
- Added missing references
- Replaced the SL3 Maps control with the new WP7 control
- 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
You can easily fix with a regex find/replace in VS:Find what – Location({.*},:b{.*})
Replace with – Location { Latitude = 1, Longitude = 2 }
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?