CRM 2011: Problem when registering custom workflow activity

Proposed Answer CRM 2011: Problem when registering custom workflow activity

  • Friday, March 15, 2013 3:26 PM
     
     

    Hi all,

    Currently I have a problem that when I try to update a custom workflow activity using plugin registration tool the following error occurred:

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: 'PluginType' entity doesn't contain attribute with Name = 'customworkflowactivityinfo'.
    Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <ErrorCode>-2147217149</ErrorCode>
      <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>'PluginType' entity doesn't contain attribute with Name = 'customworkflowactivityinfo'.</Message>
      <Timestamp>2013-03-15T15:21:18.1818272Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147217149</ErrorCode>
        <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>'PluginType' entity doesn't contain attribute with Name = 'customworkflowactivityinfo'.</Message>
        <Timestamp>2013-03-15T15:21:18.1818272Z</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.Update(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.UpdateCore(Entity entity)
       at Microsoft.Crm.Tools.PluginRegistration.RegistrationHelper.UpdateAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly, PluginType[] type)
       at Microsoft.Crm.Tools.PluginRegistration.PluginRegistrationForm.btnRegister_Click(Object sender, EventArgs e)

    After googling the error message I have found that it was an error fixed in rollup 10, and I have rollup 12 installed in the server !!

    Please advise..

All Replies

  • Saturday, March 16, 2013 9:04 AM
    Answerer
     
     

    Hi,

    These errors are usually down to a different version of the SDK assemblies being registered in the GAC on the server.

    CRM is loading an older version of the Microsoft.Xrm assemblies - since the .NET Fusion loader checks the GAC before it checks the local bin folder. Then the method that is needed is not found. The reverse can happen you use a plugin that is compiled against the latest version on an older update version.

    Have you added any of the Microsoft assemblies to the Gac? If so, you'll need to remove them or update them with the latest versions.

    You can use 'gacutil /l' on the command line - and check if there any Crm assemblies in the Server Gac. If there are, use 'gacutil /u <assembly>' to remove.


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

  • Saturday, March 16, 2013 11:31 AM
     
     
    Thanks alot, would you please provide more details about the gacutil /l ?
  • Saturday, March 16, 2013 3:02 PM
    Answerer
     
     Proposed Answer

    Hi Mostafa,

    The Gacutil is a command line that allows you to list, add and remove assemblies from the GAC. Some installations of third party software may add assemblies to the GAC so that it is available to multiple programs without it having to be in the bin folder.

    More info can be found at http://msdn.microsoft.com/en-us/library/ex0ss12c(v=vs.71).aspx

    hth


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

  • Sunday, March 24, 2013 8:56 PM
    Answerer
     
     

    Hi,

    How did you get on with this?


    Scott Durow
    Read my blog: www.develop1.net/public     Follow Me on Twitter
    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"