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?
User contributions licensed under CC BY-SA 3.0