0

Trying to use the EWS Managed API 2.0 for my MicroSoft .Net 4.0 (C#, WinForms) application.

I have downloaded the EWS Managed API 2.0 and have added a reference to the Microsoft.Exchange.WebServices.dll in my application from Visual Studio 2010 as required. But I am still unable to include this library with the using statement as follows.

using Microsoft.Exchange.WebServices.Data 

Error: The type or namespace name 'Exchange' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

Screenshot of the error enclosed. Note: For referencing the API, I have followed the instructions in the following MSDN article:
https://msdn.microsoft.com/en-us/library/office/dn528373(v=exchg.150).aspx

prgSRR
  • 169
  • 4
  • 11

1 Answers1

2

The target framework of the project needs to be changed from ".NET Framework 4 Client Profile" to ".NET Framework 4" and that will fix this error.

prgSRR
  • 169
  • 4
  • 11
  • i am bound to use .net 4 client profile fx.. does it means none of the EWS API version is compatible with .net 4 client profile ? – Muhammad Adnan Jul 21 '15 at 17:20
  • @MuhammadAdnan: Yes, looks like the EWS API cannot be accessed from a program using .Net Framework 4 Client Profile. – prgSRR Jul 29 '15 at 12:46