locked
Compact Framework 3.9 assemblies binary compatible with desktop framework? RRS feed

  • Question

  • So, I’m aware that assemblies compiled to target CF 3.5 (or earlier) will work perfectly fine if they’re referenced by a desktop application using the full desktop framework CLR.  We’ve been doing that successfully for years now with some class library assemblies that have some business logic that we want in our CF application on the device and also have on the server side that’s running within the desktop framework.  i.e., we build the assemblies one time, then include those binaries both on the device and in our desktop apps.

    Does the same still apply CF 3.9 assemblies?  i.e., could I, say, have VS2015 and Windows Embedded Compact 2013 installed, create a class library that compiles to target CF 3.9 so that it will work on a Compact 2013 device, but also use that same compiled assembly in a desktop framework application that runs under desktop framework 4.5?

    Tuesday, July 12, 2016 8:50 PM

Answers

  • Hi JPears,

    Ah, that is a great question. If the code is PURE .Net their should be no issue. The compatibility issue comes in with any PInvokes or native libraries underneath the CF code.  Note also that any direct memory calls would also be impacted as Garbage collection and memory Management is radically changed in 3.9.

    It would be fairly straightforward to test on a CEPC as those do have serial ports.

    Sincerely,

    IoTGirl

    Wednesday, July 13, 2016 7:21 PM

All replies

  • Hi jpears,

    .Net is compiled to intermediate code so *should* work. As you seem to have already tried 3.5 are you asking this question because something failed?

    Sincerely,

    IoTGirl

    Tuesday, July 12, 2016 11:36 PM
  • We have a device that runs WinCE 6.0 / CF 3.5.  Some of the CF assemblies are also used by some desktop/server software we have.  Much of it is just business logic, but there is also use of the SerialPort class.  But we've never had any issues.

    We're *considering* upgrading to Compact 2013 / CF 3.9, due to support for WinCE 6.0 fading away in a couple years (concerns by a few customers), so I was wondering if Microsoft has a stance on this.

    I've read how they're only supporting source code compatibility between CF 3.5 and 3.9 and not binary compatibility. i.e., if you have assemblies built to target 3.5, they don't support using those CF 3.5 assemblies in CF 3.9; they want you to recompile the assemblies' source code to specifically target 3.9.  But I've not been able to find any info regarding compatibility of CF 3.9 assemblies running under the full framework.

    Wednesday, July 13, 2016 2:35 PM
  • Hi JPears,

    Ah, that is a great question. If the code is PURE .Net their should be no issue. The compatibility issue comes in with any PInvokes or native libraries underneath the CF code.  Note also that any direct memory calls would also be impacted as Garbage collection and memory Management is radically changed in 3.9.

    It would be fairly straightforward to test on a CEPC as those do have serial ports.

    Sincerely,

    IoTGirl

    Wednesday, July 13, 2016 7:21 PM
  • Thanks for the feedback.
    Friday, July 15, 2016 7:39 PM
  • You are very welcome!
    Friday, July 15, 2016 8:03 PM