简体   繁体   中英

Run .NET CE Project on win32 or win64

We've developed a data collection system, that runs on windows Ce 6.0 on mobile devices. Our customer now wants to run this same system on machines with win32 or win64 installed. Is there any way to build this same project (VS2008 or VS2012) for these platforms, without changing the application itself ?

It depends on your project. For the most part compact framwork is a subset of the full framework but there are some assemblies like Microsoft.WindowsCE.Forms that don't exist on regular windows. If your project doesn't reference these assemblies then you may be able to run you project as is on the desktop. However, I would recommend you create a new project for your desktop application, using the same core code but recreate the UI code. That way you can tweak the UI for your desktop application without breaking your mobile application.

Windows mobile 6 isn't supported by anything past vs2008; I assume the same limitation is present if using the winCE base for a non-phone application as well. When a project I worked on several years ago attempted to get a library to build in both a desktop and WM6 project we were unable to do so.

MS has since provided a method to do so, portable class libraries, unfortunately they were first made available in VS2010/.net4.0 and thus are unavailable for your project. Even if they were, I suspect porting existing code to them would be difficult. The one time I tried, wanting to look at a code analysis tool that only worked with portable libraries, I found that every worker/compute/business logic project I had, had enough dependencies on non-portable libraries to make getting a stripped down version working would have required major rework. I cut my losses after several hours, when I concluded it'd be a multi-day effort just to get a stripped down version to build; and probably a similar amount to build a wrapper around the the portable project that loaded all the removed functionality back in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM