Dependent assemblies for plug-ins

Finally you can get rid of using ILMerge tool to merge assemblies. Microsoft going to introduce a new feature called “dependent assemblies” that you can include the dependency while plugin registration. Can’t wait for this new feature. I hope there will be no change in maximum size of plugin assembly.

https://docs.microsoft.com/en-us/power-platform-release-plan/2021wave1/data-platform/dependent-assemblies-plug-ins

PluginType not found in PluginAssembly which has a total of [0] plugin/workflow activity types.

Today while updating one of my plugin assembly in plugin registration tool, I got the below error.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: PluginType  not found in PluginAssembly which has a total of [0] plugin/workflow activity types.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ActivityId>2b06487c-19ac-4d04-9b0f-0d8c95aa2eb3</ActivityId>
  <ErrorCode>-2147204725</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <a:key>ApiExceptionSourceKey</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">Plugin/Microsoft.Crm.ObjectModel.PluginAssemblyService</a:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
      <a:key>ApiOriginalExceptionKey</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">Microsoft.Crm.CrmException: PluginType not found in PluginAssembly  which has a total of [0] plugin/workflow activity types. ---&gt; Microsoft.Crm.CrmException: PluginType not found in PluginAssembly which has a total of [0] plugin/workflow activity types.

After a bit of research, I found that I forgot to change the “Copy Local” property to false of “Microsoft.Xrm.Sdk” and “Microsoft.Crm.Sdk.Proxy” dlls. In our case, we are using ILMerge to merge different dlls but these Microsoft dlls should not be part of the Merged dll. After setting the “Copy Local” property to “false”, Plugin assembly updated sucessfully.

Hope it helps…..