2
votes

First of all, i have a device with Windows Embedded CE 6.0. As we know, EWS Managed API can only be used on .NET Framework 3.5 and above.

I created a new project ->Smart Device Project ->

Target Platform: Window CE

.NET Compact Framework Version: .NET Compact Framework Version 3.5

Templates: Device Application

Then i tried to use EWS API library to write a program to send email from server to my email but there is an error.

Error 1 The type 'System.TimeZoneInfo' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Documents and Settings\christopher.lim\My Documents\Visual Studio 2008\Projects\SmartDeviceProject1\SmartDeviceProject1\Form1.cs 23 13 SmartDeviceProject1

This error occur when .NET Framework is not compatible which means my Window Embedded CE 6.0 cannot run application which need .NET Framework 3.5.

So is there anyway that i can upgrade my Window CE so that it can run .NET Framework 3.5 and above application??

Hope someone can help me with this. Thanks in advance.

1

1 Answers

4
votes

The Compact Framework, in all iterations, will work fine under CE 6.0 (1.0 isn't officially "supported" but it would run if you wanted to use it).

The issue you're seeing is a compiler problem, not a runtime problem. The root of the problem is (cryptically) stated in the error, in the public key token. b77a5c561934e089 is the public key for the desktop framework.

Basically the compiler is telling you "Hey, you're referencing a DLL that uses the desktop System.Core.dll assembly, so you need to add a reference to that DLL." The problem with that is that the desktop System.Core.dll assembly will not run on a Windows CE device.

You have to use the Compact Framework System.Core.dll (which has a public key of 969db8053d3322ac). That means that whatever you're referencing (EWS Managed API) must be recompiled using the Compact Framework references, or you must find an alternate way to provide the feature/function you're after.