locked
The located assemblys manifest defination does not match the assembly reference. RRS feed

  • Question

  • Hi,

    I have imported organization in new environment using .bak file. After completed deployment i am exploring the system but unfortunitly getting issues related to plugins on opportunity records. can you please anyone help me on this. Below i shared the log file and error screen.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9690.2165, 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)Detail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147220891</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
        <KeyValuePairOfstringanyType>
          <d2p1:key>OperationStatus</d2p1:key>
          <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">0</d2p1:value>
        </KeyValuePairOfstringanyType>
      </ErrorDetails>
      <Message>Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9690.2165, 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)</Message>
      <Timestamp>2015-04-14T07:08:43.8293096Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText>

    [OpportunityPlugins.Plugins: OpportunityPlugins.Plugins.PostOpportunityUpdateEstCloseDt]
    [2d74942a-9799-e411-a3d6-00155d012d28: PostOpportunityUpdateEstCloseDt]
    Entered OpportunityPlugins.Plugins.PostOpportunityUpdateEstCloseDt.Execute(), Correlation Id: a8fdba7f-8b53-48e3-a237-6fe6388ac1f5, Initiating User: 81e71657-a917-e111-af73-00155d011f08
    OpportunityPlugins.Plugins.PostOpportunityUpdateEstCloseDt is firing for Entity: opportunity, Message: Update, Correlation Id: a8fdba7f-8b53-48e3-a237-6fe6388ac1f5, Initiating User: 81e71657-a917-e111-af73-00155d011f08
    Exiting OpportunityPlugins.Plugins.PostOpportunityUpdateEstCloseDt.Execute(), Correlation Id: a8fdba7f-8b53-48e3-a237-6fe6388ac1f5, Initiating User: 81e71657-a917-e111-af73-00155d011f08

    </TraceText>
    </OrganizationServiceFault>

    Kindly help me.

    I checked plugins registered in Database.

    Tuesday, April 14, 2015 7:40 AM

All replies

  • Hi,

    You have a plugin: "PostOpportunityUpdateEstCloseDt"

    And it throw an exception: Could not load file or assembly 'Microsoft.Xrm.Client, Version=5.0.9690.2165, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.

    You should make sure, that you have this Assembly installed on your server (using gacutil) and install it, if it is not on your server, or edit your plugin and change this assembly on assembly, which is in your server assemblies.



    • Edited by xjomanx Tuesday, April 14, 2015 10:25 AM
    Tuesday, April 14, 2015 10:21 AM
  • You plugin assembly (OpportunityPlugins.Plugins.PostOpportunityUpdateEstCloseDt) has a reference to v.5.0.9690.2165 of the Microsoft.Xrm.Client assembly, and the error indicated that v.5.0.9690.2165 of the Microsoft.Xrm.Client assembly is not available in the new environment

    Ideally, plugins should not use the Microsoft.Xrm.Client assembly, but instead use the Microsoft.Xrm.Sdk assembly, which will always be available. So, the preferred solution would be to recreate the plugin assembly without the reference to the Microsoft.Xrm.Client assembly

    An alternate solution, which may be quicker, would be to recompile the plugin assembly against whichever version of the Microsoft.Xrm.Client assembly is on the system, but this won't solve potential future errors with future Crm versions


    Microsoft CRM MVP - http://mscrmuk.blogspot.com  http://www.core.co.uk


    Tuesday, April 14, 2015 2:52 PM
    Moderator