I need to call some Dynamics 2011 CRM WebServices from a WebApi build on .Net Core 2.1.
To use CRM SDK I need these dependencies : - Microsoft.Xrm.Sdk.2011 5.0.18 - Microsoft.Crm.Sdk.Proxy.2011 5.0.18 - Microsot.IdentityModel 6.1.7600.16394
When I call my method this exception is raised :
System.TypeLoadException : 'Could not load type 'System.ServiceModel.Description.MetadataConversionError' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.'
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateManagement[TService](Uri serviceUri)
Is there any workaround to avoid this exception ?
This problem also occurs in IIS Express and aspnet_regiis -iru could no be applied. I think it is more a .Net Core issue with 4.5 assemblies.
Thanks in advance.