0
votes

I'm doing the automation with CRM. Im getting the below error. I have reinstalled all the nuget packages, deleted all the dlls from bin and re-built the code still remain same.

Can you please guide where are we doing wrong.

<package id="Microsoft.CrmSdk.CoreAssemblies" version="8.1.0.2" targetFramework="net46" />
<package id="Microsoft.CrmSdk.CoreAssemblies" version="8.2.0.1" targetFramework="net46" />

Message: Unit Test Adapter threw exception: Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=9.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) Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=8.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 update the coreAssemblies enter image description here

Note: The Project and solutions are downloaded by source control which checked-in and running setup. I'm trying setup the my environment

1
I doubt you are targeting CRM 2011 with SDK v9. If you intend to use SDK v9, your Nuget package version should be something like 9.0.2.5. I guess your target .NET Framework version is lower than 4.6.1 and so Nuget is forcing a lower SDK version on you. Remove all packages, sort out your projects .NET Framework version and re-add the matching Nuget packages.Filburt
The assembly’s version being used in the project is ok? No mismatch?i.Dio
@Filburt MyTarget .Net Framework version is 4.6.2Thiyagarajan
@i.Dio Assembly versions all good.Thiyagarajan
@Thiyagarajan Switch to .NET 4.6.1 - my various projects are working fine with this and SDK version 9.0.2.xFilburt

1 Answers

0
votes

We found the solution for the given problem. Need to change version in dependent assembly tag in app.config file.we have to change in each project where the assembly has been referred. please find the screenshot for your reference.

<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />

[![enter image description here][1]][1]