“Plug-in assembly fullnames must be unique” on updating plugin registration

dynamics-crmdynamics-crm-2011

Dynamics CRM 2011 on premise.

I registered a custom workflow assembly using the Plugin Registration Tool.

The plugin code was:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Activities;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;

namespace CreateDirectDebit
{
    public class CreateDirectDebit : CodeActivity
    {
        protected override void Execute(CodeActivityContext context)
        {

        }
    }
}

This was successful.

Then I change the code to this:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Activities;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;

namespace CreateDirectDebit
{
    public class CreateDirectDebit : CodeActivity
    {
        protected override void Execute(CodeActivityContext context)
        {
            // Create the tracing service
            ITracingService tracingService = context.GetExtension<ITracingService>();
            if (tracingService == null)
                throw new InvalidPluginExecutionException("Failed to retrieve the tracing service.");

            tracingService.Trace("CreateDirectDebit.Execute, 1");


            throw new InvalidPluginExecutionException("Testing dialog custom workflow.");

        }
    }
}

When I update the assembly using the Plugin Registration Tool I get this error on pressing Update Selected Plugins:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Plug-in assembly fullnames must be unique (ignoring the version build and revision number).
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorCode>-2147204741</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>Plug-in assembly fullnames must be unique (ignoring the version build and revision number).</Message>
  <Timestamp>2013-10-14T10:04:55.4528719Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204741</ErrorCode>
    <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>Plug-in assembly fullnames must be unique (ignoring the version build and revision number).</Message>
    <Timestamp>2013-10-14T10:04:55.4528719Z</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)

The same error occurs if I revert the code to the first version and try to update the assembly.

What have I done wrong?

Best Answer

This usually arises for one of two reasons:

  1. You've clicked Register rather than Update in the Plugin Registration Tool

  2. You've clicked Update but you had selected the wrong plugin/workflow assembly to update.

Related Topic