none
Using the EWS Managed API with ASP.NET Core 2.0 RRS feed

  • Question

  • Hello,

    I'm trying to create a web-application in ASP NET Core that uses the EWS Managed API. I have tried to follow the documentation on using the EWS Managed API on msdn.microsoft.com and have got it working with ASP NET web-application using the ASP NET Framework 4.6.1 but I receive the following error when trying to use it with ASP NET Core 2.0:

    FileNotFoundException: Could not load file or assembly 'Microsoft.Exchange.WebServices, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

    What might be the issue here? Is it possible to use the EWS Managed API with Core 2.0, and if that's the case: what do I need to get it working?
    Thanks so much in advance
    Best regards Isak
    Wednesday, April 11, 2018 9:27 AM

All replies

  • The EWS Managed API has been open sourced a few year ago so there are a no official new release but updates have been made and you can compile the latest version from Git hub https://github.com/OfficeDev/ews-managed-api. With .NET core support i would suggest you look at the issue https://github.com/OfficeDev/ews-managed-api/issues/96 and the fork somebody has created from source.

    Cheers
    Glen

    Thursday, April 12, 2018 11:26 PM
  • Thanks Glen, I've been looking in to the fork and trying to use the only one that I can find which is said to work with ASP.NET Core at https://github.com/sherlock1982/ews-managed-api. I can't get it to work however, and when I'm trying to download the nuget package https://www.nuget.org/packages/Microsoft.Exchange.WebServices.NETStandard/ I get the following error: Install-Package : NU1202: Package Microsoft.Exchange.WebServices 2.2.0 is not compatible with netcoreapp2.0 (.NETCoreApp,Version=v2.0). Package Microsoft.Exchange.WebServices 2.2.0 does not support any target frameworks. At line:1 char:1 + Install-Package Microsoft.Exchange.WebServices -Version 2.2.0 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand Install-Package : Package restore failed. Rolling back package changes for 'ASPNETCoreEmailApplication'. At line:1 char:1 + Install-Package Microsoft.Exchange.WebServices -Version 2.2.0 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand It seems like the fork is also very inactive. Does anyone know if there are better ways to use an ASP.NET Core 2.0 application to speak with an exchange server to receive and request information about calendar-events without having to pay for a subscription? Best regards Isak
    Friday, April 13, 2018 6:41 AM