Convert Windows CE 5 project to Windows Mobile 6 Project in VS2005

I have VS2005 on an XP machine.  I have a VB.NET project that has been running on Windows CE 5 for many years now...  I need to run in on Windows Mobile 6 now.  
I have installed the Windows Mobile 6 Professional SDK, 6.5 DTK and 6.5.3 DTK.  I have rebooted.

If i make a new project, I see Windows Mobile 6 as an option.  However, how can I add WM 6 to the existing project? Can i compile the same code for both devices?  

If I use the Configuration Manager and try to set an active solution platform to WM 6, it does not show up.  if I attempt to make a new active solution platform, WM6 is not available to copy from.

What is the procedure to recompile a project for Windows Mobile 6.x?
Who is Participating?
alexey_gusevConnect With a Mentor Commented:
I think the question is worth keeping (let alone award some points :) ) because it highlights potential caveats in conversion and also what to specify when asking such kind of question (targeting 3.5 for instance - it was crucial for the result since vs2005 doesn't support it)
have you tried to change the Platform for the project (via Project -> Change Target Platform) ?

if it doesn't work, then you might be required to edit your proj file manually, ie create dummy project for Wm6 and then have a look at something like this:

    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>

and finally copy it into your old project
DonnaOsburnAuthor Commented:
The only difference between what you have listed above and my project file is that i have OSVersion 5.02 where yours is 5.01
When i select Project - Change Target Platform - it says the Current Platform is "Windows Mobile 6 Professional SDK".  However, on the configuration manager, Windows Mobile is not an available choice.  If i try to Add a new one, Windows Mobile 6 is not available to copy from.
I notice that the references for my application are all to things like
c:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\CompactFramework\2.0\v2.0\WindowsCE\System...., etc
Will i need to change all the references? what would they change too? there is only Compact Framework, PocketPC2003, SDKTools, Smartphone2003, SQL Server, and Visual Studio available under that SDK folder.  Would they have to point to the c:\Program Files\Windows Mobile 6 SDK\???
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

mine was 5.01 because I've used VS2005 and WM50 SDK as an example.

in theory, when you change the platform it would update the references, but that's in theory :)
I usually check where they point to and re-add them manually if needed.

I have tried to create new project (with WM60 already installed though) for WM50, then change target platform, for WinCE50 etc etc

I suspect in your case it might come to the worst case and you'll be needing to recreate the project from scratch. Maybe try to switch to WM50 first and then back to WM6.

"Solution Platforms" is set to "Any CPU" usually so Configuration Manager can't help in this case. Therefore the only thing you should check is that you're using the same CF.NET version (presumably v2.0), then the build for WM50 should work on WM60 (and even for WinCE 5.0)
DonnaOsburnAuthor Commented:
I don't have Windows Mobile 5 SDK's installed.  (i went straight to WM 6).
So you are suggesting that i uninstall all the Windows Mobile 6 SDK's DKT's and install the Windows Mobile 5 and try that?
Theory is always great but i've not found Microsoft products to use it much :)
Thanks for your help
I completely agree  - MS isn't great at the theory :)

no need to uninstall all SDKs, just install WM50 and try to change the target. sometimes all it takes is a simple step, so having WinCE and then WM50 might do the trick, and then WM6 is likely to reappear too
DonnaOsburnAuthor Commented:
I have had no luck with this.  It appears WM6 and VS2005 and .Net 3.5 don't want to play nice.  I installed VS2008 and can now at least get my app running on the Unit.  Not working, but running....
ahhhhhh, you never mentioned 3.5 (unless I've overlooked it, that is :) )

vs2005 offers v2.0 as a maximum (regardless of the SDK), for v3.5 you must have vs2008 standard at least.

what is not working in your project? anything specific?
DonnaOsburnAuthor Commented:
I have two projects actually.  one is a (which was the origianla question) and the other is c#.  i'm currently working on the c# one. I was able to get vs2008 to deploy to the device and "run" the app.
what's not working...  Three major issues - after i conquer them, im sure there will be more..
1) I was using wceload.exe to programatically install the cab files in the correct order and check for existing files, etc.  wceload.exe does not appear to exist on WM6.5 Classic device... I can't see if it was replaced with another exe or i have to find a copy that will work...
2) Screen real estate.  on the CE 5 i have great screens with lots of dats, the resolution on this WM6.5 beast shows 4 lines in windows explorer.  same hardware with ce 5 shows 12 lines...  
3) Device Lockdown.  on CE, i could simply force my screen full size and the users could not exit to get to any other app to play (games, ie, whatever)  A requirement...  WM6.5 i haven't figured out how to lock down the title bar with sound, battery, and time. yet...
This is the exact same physical device(Screen size, key configuration, etc).  A Motorola MC3090 (CE 5) vs an MC3190 (WM6.5 Classic with .net 3.5 that comes on it.)
1) as far as I know, good old wceload beast is still there, but Classic always had its issues, you might check Security Policies:
etc etc

you can examine "HKLM\Security\Policies\Policies" values for a long list of possible settings - there might be few like should cabs be signed or should it prompt for Unknown Publisher and so forth

2) it depends on the device you're using, WM 6.x Professional devices have huge screens with the resolutions like 600x800; Classic edition is just a humble phone :)...

3) I would recommend the simplest method to get full screen forms:

- don't use any frame for the form
- set its window state as maximized

it's not ideal, in theory you should P/Invoke WIn32 API SHFullScreen() with different flags, but in most scenarios it might just do
DonnaOsburnAuthor Commented:
I thank you for all your assistance on this.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.