Low Chen Thye
Low Chen Thye

Reputation: 137

.Net 6 dataverse client sdk error could not load type System.Runtime.Serialization.IDataContractSurrogate

Recently we have started a c# project using .Net 6.0. My team intended to use the Microsoft.PowerPlatform.Dataverse.Client sdk to connect to dynamics 365 crm for our development. However, when we hit the error as shown in image 1 below. May i know is it the SDK does not support .Net 6.0 yet?

error image

Upvotes: 2

Views: 3234

Answers (3)

Low Chen Thye
Low Chen Thye

Reputation: 137

I have found the answer. Do not install the Microsoft.CrmSdk.CoreAssemblies library. That will resolve the issue.

enter image description here

Upvotes: 10

HsuTingHuan
HsuTingHuan

Reputation: 625

The Dynamics 365 support .NET 4.6.2 in general

take a look here Starting with the Dynamics 365 for Customer Engagement apps version 9.0

In the NuGet page, can know that it is support net462, net472, net48, netcore3.1

image from Nuget enter image description here

BUT I will recommend you use the .Net framework 4.6.2 in your application. To prevent unpredictable problem

Upvotes: 0

AnkUser
AnkUser

Reputation: 5531

Microsoft.PowerPlatform.Dataverse.Client sdk to connect to dynamics 365 crm

works with .net framework 4.6.2 or .net core 3.1

MS Docs

MS Github

Upvotes: 1

Related Questions