CRM 2011: Unable to load plugin assembly

Question CRM 2011: Unable to load plugin assembly

  • Wednesday, April 11, 2012 3:13 PM
     
     

    Hey,

    I am trying to import my solution to new environment, and get 'Unable to load plugin assembly'. When I run the plugin registration tool(Isolation Mode: None, Assembly stored location: Database), I get the same error. I'm doing this as System account, so I think I have full control permission. I check two xrm.sdk.dll and xrm.client.dll are under GAC as well. The PDB file is under ..\server\bin\assembly as well. Basically I tried all I found from all the web resources, none of them works. However, my solution can be imported to other environment without issues. So I guess something is wrong with the new environment. Totoally run out of idea. Need help!

    Thanks in advance.

All Replies

  • Wednesday, April 11, 2012 6:02 PM
     
     

    My memory fails, but if i recall there were some issues around whether your plugin has a default constructor 'yourPlugin()' , maybe as part of the change from 4.0 to 2011?

    Also, double-check that you are a deployment administrator. Do you get any more detail other than 'unable to load plugin assembly'?

  • Wednesday, April 11, 2012 8:54 PM
     
     

    Yes. I am a deployment administrator. Again, I want to mention that the plugin assembly runs OK in other environment. This is what I got when I run the plugin registration tool.

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Unable to load plug-in assembly.
    Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <ErrorCode>-2147204719</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>Unable to load plug-in assembly.</Message>
      <Timestamp>2012-04-11T20:04:58.5037278Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147204719</ErrorCode>
        <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>Unable to load plug-in assembly.</Message>
        <Timestamp>2012-04-11T20:04:58.5037278Z</Timestamp>
        <InnerFault i:nil="true" />
        <TraceText i:nil="true" />
      </InnerFault>
      <TraceText i:nil="true" />
    </OrganizationServiceFault>
    Server stack trace:
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    Exception rethrown at [0]:
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
       at PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly) in \\D-MJKNTT6\c$\CRM2011\sdk\tools\pluginregistration\RegistrationHelper.cs:line 227
       at PluginRegistrationTool.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e) in \\D-MJKNTT6\c$\CRM2011\sdk\tools\pluginregistration\PluginRegistrationForm.cs:line 461

  • Wednesday, April 11, 2012 10:12 PM
     
     
    Make sure that you have the correct version of the Microsoft.Xrm.Client assembly in the GAC; if necessary, you can store multiple versions of the same assembly in the GAC.

    --pogo (pat) @ pogo69.wordpress.com