Solved

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

Posted on 2010-08-30
11
1,653 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
ID: 33565734
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
ID: 33567144
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
ID: 33567496
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:DonnaOsburn
ID: 33567631
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
ID: 33567881
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
 

Author Comment

by:DonnaOsburn
ID: 33589590
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
ID: 33590006
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
ID: 33590196
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
ID: 33590439
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
ID: 33632563
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
ID: 33632597
I thank you for all your assistance on this.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help with opening combobox using VB.NET. 3 34
get combo value in class 5 23
SSRS 2016 Rendering HTML tables 3 56
Need help with a query 3 37
Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

735 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