Solved

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

Posted on 2010-08-30
11
1,625 Views
Last Modified: 2012-06-27
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?
Thanks
0
Comment
Question by:DonnaOsburn
  • 6
  • 5
11 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
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:


  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{CC411789-8A77-4B00-A035-6D61982EE85F}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>YOUR_PROJECT_NAME</RootNamespace>
    <AssemblyName>YOUR_PROJECT_NAME</AssemblyName>
    <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <PlatformFamilyName>PocketPC</PlatformFamilyName>
    <PlatformID>4118C335-430C-497f-BE48-11C3316B135E</PlatformID>
    <OSVersion>5.01</OSVersion>
    <DeployDirSuffix>YOUR_PROJECT_NAME</DeployDirSuffix>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
    <FormFactorID>
    </FormFactorID>
  </PropertyGroup>

and finally copy it into your old project
0
 

Author Comment

by:DonnaOsburn
Comment Utility
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
...Microsoft.WindowsCE.Forms
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\???
Donna
0
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
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)
0
 

Author Comment

by:DonnaOsburn
Comment Utility
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
Donna
0
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
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
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:DonnaOsburn
Comment Utility
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....
 
Thanks
 
0
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
ahhhhhh, you never mentioned cf.net 3.5 (unless I've overlooked it, that is :) )

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

what is not working in your project? anything specific?
0
 

Author Comment

by:DonnaOsburn
Comment Utility
I have two projects actually.  one is a vb.net (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.)
 
 
0
 
LVL 24

Expert Comment

by:alexey_gusev
Comment Utility
1) as far as I know, good old wceload beast is still there, but Classic always had its issues, you might check Security Policies:

http://msdn.microsoft.com/en-us/library/bb416355.aspx
http://msdn.microsoft.com/en-us/library/bb416353.aspx
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
0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
Comment Utility
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 cf.net 3.5 for instance - it was crucial for the result since vs2005 doesn't support it)
0
 

Author Closing Comment

by:DonnaOsburn
Comment Utility
I thank you for all your assistance on this.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now