Upgrading to Windows Mobile 5.0 Smartphone
I finally got around to upgrading some code originally written in Visual Studio 2003 for Windows Mobile 2003 Smartphone. Since it wasn't straight forward, I thought it might be helpful to share my experience.
Before starting, I installed Visual Studio 2005 and the Windows Mobile 5.0 Pocket PC and Smartphone SDKs. The solution I was upgrading had one Smart Device Application project and a few referenced components. In one of the components, I had manually referenced the System assemblies for the 1.0 Compact Framework. The other assemblies had no notable references.
Opening the solution in Visual Studio 2005 prompted me to upgrade the code. The conversion was successful according to the report. I thought that maybe switching the Target Platform via the context menu option on the Smart Device Application might be all I had to do. I was wrong.
I was running into the following error when compiling: "Version 2.0 is not a compatible version." Figuring that this was related to the my manual Compact Framework references, I realized I had to update some of the references to the 2.0 version. That didn't fix the issue, though.
To fix and fully upgrade the code, I had to create new projects to replace all of my old projects. When creating the new projects, I found that you can actually now create Class Library projects specifically for the Smartphone.
This is really nice because when adding references it only shows the Compact Framework 2.0 versions. Taking that a step further, I could NOT reference an assembly that wasn't created this way. After creating new shell projects and hooking up my references and resources, everything compiled and ran. It didn't seem to run as efficiently as it did in the old emulator, though...but that may need to be a whole new topic.