views:

221

answers:

1

I'm trying to use the EWS API to access an Exchange server from a console program i'm writing. I've specified the type of exchange server i'm connecting to but when I try to execute the code i have, it gives me

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\jsorensen\My Documents\Visual Studio 2005\Projects\ConsoleApplication2\ConsoleApplication2\Program.cs 26 13 ConsoleApplication2

Does Microsoft Visual Studio Academic Edition not support TimeZoneInfo or is the version of .Net that XP can have not up-to date enough to work with the EWS API? I'm moderately new to programming in C# so some of the stuff is still confusing.

+1  A: 

Looking at your code it looks like you're targeting .Net 2.0, and the TimeZoneInfo class is defined in .Net 3.5. See if you can upgrade your project to 3.5, and that should do it.

BFree