0
votes

I'm just wondering if a regular desktop .NET app can be easily ported to CE.

Supposedly .net should be platform independent, so my assumption is that an app can be developed for win xp/7 .net and just copied to the mobile device, and except for any visusal discrepancies (resolution and so on) I expect it to work.

However: it doesn't!

If I copy a regular .net 3.5 app to my mobile device it gives an error about a missing assembly (Forms 2.0.0). I installed .net compact framework on the device, so I'm kind of lost.

I'm using Visual Studio 2008 Express and I'm aware that there is no official support for mobile device development. But I don't need a debugger and I don't need WYSIWYG development.

Any way to get it to work?

Thanks!

2

2 Answers

0
votes

For Windows Mobile/Windows CE you must you Compact Framework. However, the Compact Framework has only several features (classes, methods, etc...) from "full" framework.

0
votes

Just being ".NET" doesn't make it platform independent. The .NET Compact Framework is a subset of the full framework, and (more importantly) it doesn't support all of the full framework opcodes.

The net result of this is that a full framework assembly will never wok under the Compact Framework. The CF loader will not be able to find the desktop strong-named framework assemblies, and even if you copy them to the device, they will fail to load.

Now an intereting side note is that a CF assembly is retargetable, meaning that something compiled for the CF can be copied to the full framework and it will run (with a load of caveats). Do a simple CF "Hello World" app and you'll see it works fine on the desktop. As soon as you P/Invoke coredll or use any CF-specific items you'll get a failure, but for business logic type simple assemblies, you can just use the CF compiled pieces.