New CrmSdk force us to use .NET v4.6.2
It's that time of the year when all older organizations are upgraded to the latest version of Dynamics and with that upgrade tons of new issues are produced as usual.
First of all, I have noticed that a lot of async jobs started to fail (not every time) due to 2 errors:
- System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state
- System.TimeoutException: Couldn’t complete execution of the custom activity XYZ plug-in within the 2-minute time limit.
The main problem was that I forgot to update the SDK on the workflow activities project to the v9.x version, but when I tried to update to the latest SDK version I was stopped by an interesting error.
Could not install package 'Microsoft.CrmSdk.CoreAssemblies 9.0.2.9'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
There is no info about required .NET framework version on the NuGet installer screen.
But when you search up for the NuGet package on the web (https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies) you will find the answer very quickly.
The answer is that from now on you need to use .NET v4.6.2 on all of your projects that will use new SDK NuGet packages.
This is a smart move by Microsoft that finally confirms that .NET v4.6.2 DLL assemblies are officially supported on D365.
It's time to update all those .NET v4.5.2 projects to the new version of the framework and take advantages of it.