"Plug-in assembly fullnames must be unique" on updating plugin registration
Asked Answered
O

4

5

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?

Oxidimetry answered 14/10, 2013 at 10:22 Comment(4)
Have you tried to it after incrementing the version number?Waneta
You have to be an admin (crmdm.blogspot.com/2011/06/…) I'm assuming you are?Circumbendibus
This usually happens if you are trying to add the assembly again - daft question, but are you sure you are updating the existing assembly and not trying to add a new one?Thematic
@Oxidimetry glosrob is probably right. In my experience, the Admin issue and the "updating" with a new assembly are the most common causes. Do you know how to get the public token for your assembly? double check to make sure the two are the same. Namespace and naming alone do not define an assembly's uniqueness.Dorinda
R
10

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.

Rely answered 23/1, 2018 at 15:26 Comment(0)
P
1

In Dynamics CRM 2011 plugin and workflow assemblies can be updated as long as name, public key, major version and minor version of existing and new assemblies are the same. If the minor version of your assembly has been incremented (your VS build may have done this automatically), then both are considered to be different.

They can however be registered side-by-side. Just register the new version and remove the old one.

Poetry answered 14/3, 2014 at 21:8 Comment(0)
B
1

In my case, I received this error when trying to update a plugin.

The plugin I had selected to update in the Registered Plugins & Custom Workflow Activities area wasn't correct. The names were very similar so I didn't notice at first.

By selecting the correct plugin to update from the list, I was able to continue with the update.

Benzidine answered 10/10, 2019 at 4:6 Comment(0)
C
1

Your assembly must be strongly signed with the full strongname matching. The two most likely culprits are the version number and that you've used a different key to sign the assembly.

I wrote up a blog post with more info:

PLUGIN ASSEMBY FULLNAMES MUST BE UNIQUE http://helpfulbit.com/plugin-assemby-fullnames-must-be-unique/

Cowbane answered 11/9, 2020 at 3:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.