Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Dynamics CRM SDK with .NET Core

Is there a way to connect to Dynamics CRM 365 from a .NET Core application via the Dynamics SDK? Or should I use the Web Api?

I've read it could be possible, but when I reference the SDK from my .NET Core Class Library and try to connect I get the error:

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Web.Services..

It seems like this DLL is not supported in .NET Core: How to use soap web services in Asp.net Core?

My code is like this:

 new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString);

I could succesfully make it work from a .NET Framework project.

like image 933
Tamas Molnar Avatar asked Oct 24 '18 13:10

Tamas Molnar


People also ask

What is Dynamics CRM SDK?

The Microsoft Dynamics CRM 2016 Software Development Kit (SDK) is for developers. The documentation contains information for developers writing server side code, client-side scripts, custom business logic, integration modules, workflow assemblies, and plug-ins.

What is Microsoft XRM SDK?

XRM SDK is basically a kind of data layer access to CRM and hence it only provides functionality related to data access such as Create/Update/Delete/Read. It does not support MetaData Service messages.

Does Microsoft Dynamics integrate with Sage?

Yes, Microsoft Dynamics does integrate with Sage 50 Professional. For example, you can use Microsoft Dynamics to create an invoice record, which will link to your order record in the ongoing deal, and that data will transmit as an invoice into Sage 50 Professional.


1 Answers

You should try the new CDM SDK. It uses .NET Core and supports Dynamics CRM 365. https://www.nuget.org/packages/Microsoft.PowerPlatform.Dataverse.Client

Just remember to replace:

new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString);

With this:

new Microsoft.PowerPlatform.Dataverse.Client.ServiceClient(connectionString);

Make sure you select Include prerelease. Package Management Screen

like image 160
Daniel Holth Avatar answered Sep 17 '22 15:09

Daniel Holth