.netcompact-frameworkwindows-xp-embedded

.NET compact framework on Windows XPE


I have a .NET 2.0 application running on Windows XP Embedded. I have problems with memory consumption of this application on devices that have low amount of memory (128Mb and less). Obviously, .NET wasn't a good choice for such devices, but we were too late to realize it.

I am considering ways to reduce the memory footprint of the application with minimal effort. I am thinking of porting it to .NET Compact Framework and I can not understand whether I'll be able to convert my app to it and if it will help. Unfortunately I don't have any prior experience with CF, so I am looking for advice on the following questions:

Is it possible to launch NETCF applications on Windows XPE? It looks like CF apps are supposed to be launched on Windows CE only, but I can't understand why they wouldn't run on regular windows, plus this article: http://msdn.microsoft.com/en-us/library/aa459170.aspx suggests that it is possible, but doesn't give into much details.

Am I to expect many compatibility issues while porting my Windows Forms app (which also has Com Interop functionality) to CF?

Will porting to CF help reduce the memory footprint? Currently I see that the app, when started, occupies about 30 Mb in memory. Any basic winForms app occupies around 20 Mb.

Maybe there are better solutions for reducing my app's memory footprint (besides rewriting everything in C++ and Win32API :) )

Thanks!


Solution

  • Compact Framework assemblies are retargetable, which means that if you build a CF app, it can be run under the full framework. However that's not going to really help you - it's still the full framework running the app, with all of the full framework overhead. What you really need is a version of the Compact Framework engine/BCL itself running on your target. That (meaning a CF build that runs on a desktop OS) doesn't exist.