prgSRR
prgSRR

Reputation: 169

Unable to reference EWS Managed API

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

Upvotes: 0

Views: 2380

Answers (1)

prgSRR
prgSRR

Reputation: 169

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.

Upvotes: 2

Related Questions