How to get package Microsoft.CrmSdk.XrmTooling.CoreAssembly working with other dependencies

0

I've added Microsoft.CrmSdk.XrmTooling.CoreAssembly so that I can connect using new CrmServiceClient(connectionString) rather than using OranisationServiceProxy as CrmServiceClient is meant to work better for long running data replication jobs.

However, I now get this exception

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Rest.ClientRuntime, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

when I try to access the key vault

AzureServiceTokenProvider azureServiceTokenProvider = new AzureServiceTokenProvider();
var keyVaultClient = new KeyVaultClient(new KeyVaultClient.AuthenticationCallback(azureServiceTokenProvider.KeyVaultTokenCallback));

This is my current list of dependencies:

<PackageReference Include="AdaptiveCards" Version="1.2.2" />
<PackageReference Include="Microsoft.Azure.KeyVault" Version="3.0.4" />
<PackageReference Include="Microsoft.Azure.Services.AppAuthentication" Version="1.3.1" />
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly" Version="9.1.0.13" />
<PackageReference Include="Microsoft.Graph" Version="1.17.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.4.0" />

Any suggestions?

dynamics-365
asked on Stack Overflow Sep 30, 2019 by Andrew Sumner

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0