0
votes

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

1
Take a look at this link: stackoverflow.com/questions/5270484/…Sairaj
@Sairaj: Thank you very much indeed. That fixed the error.prgSRR

1 Answers

2
votes

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.