Recently, while upgrading our D365 instance from V8 to V9, we had some batch jobs for integration which were running on v184.108.40.206 of CRM related NuGet packages. As part of V9 upgrade we need to upgrade those NuGet packages to v220.127.116.11.
While upgrading XrmTooling.CoreAssembly to v18.104.22.168, 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 22.214.171.124 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 v126.96.36.199.
Hope it helps !!