Recently, while upgrading our D365 instance from V8 to V9, we had some batch jobs for integration which were running on v22.214.171.124 of CRM related NuGet packages. As part of V9 upgrade we need to upgrade those NuGet packages to v126.96.36.199.
While upgrading XrmTooling.CoreAssembly to v188.8.131.52, we were getting the below error: “Unable to resolve dependencies. ‘Microsoft.IdentityModel.Clients.ActiveDirectory 3.19.8’ is not compatible with ‘Microsoft.CrmSdk.XrmTooling.CoreAssembly 184.108.40.206 constraint: Microsoft.IdentityModel.Clients.ActiveDirectory (>= 2.22.302111727 && < 3.0.0)”
We found that Clients.ActiveDirectory NuGet package installed was of v3.19.8.
To fix the issue, we downgraded the Clients.ActiveDirectory NuGet package to v2.29.0 (highest version between the range 2.22.302111727 && 3.0.0).
After downgrading it, we were able to upgrade the NuGet package for XrmTooling.CoreAssembly to v220.127.116.11.
Hope it helps !!