locked
CRM 2013 Plugin registration error "plug-in assembly does not contain the required types or assembly content cannot be updated" RRS feed

  • Question

  • I was trying to go through the basic steps to create custom plugin and registering through VS2012 CRM 2013 solution template, and when I register first time the plugin solution and workflow, solution, it register correctly and changing the ID from "oo..." to something. But when I put Plugin types and plugin detail into plugin solution into Registerfile, it throws below error:-

    "Error registering plugins and/or workflows. Plug-in assembly does not contain the required types or assembly content cannot be updated."I tried few different thing about deleting existing plugin from CRM 2013 and registering the entire RegisterFile at once, but didn't make different.

    Any idea what could be wrong here??

    <?xml version="1.0"?>
    <Register xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/crm/2011/tools/pluginregistration">
      <Solutions>
        <Solution Description="" Assembly="SSCOPlugin.Plugins.dll" Id="969e5025-f2ce-e311-9403-0050568b5161" IsolationMode="Sandbox" SourceType="Database">
          <PluginTypes>
            <Plugin Description="Create Task" FriendlyName="Create Task" Name="SSCOPlugin.Plugins.CreateTaskPostAccount" Id="00000000-0000-0000-0000-000000000000" TypeName="SSCOPlugin.Plugins.CreateTaskPostAccount">
              <Steps />
            </Plugin>
          </PluginTypes>
        </Solution>
      </Solutions>
      <XamlWorkflows />
    </Register>

    Monday, April 28, 2014 8:31 PM

Answers

  • Tim,
              I was able to work around. I had 2 separate instances of CRM 2013, so I connected to other CRM instance and able to use CRM Explorer and just right click on Account Entity and selected "Create Plug-in" option, which allowed me to create separate plugin. Then I modified the plugin code and able to test on this instance. Then I switch to other Instance and able to deploy without issue and tested successfully.

    But strange thing , is One instance CRM Explorer doesn't work for "Create Plug-in" option and throws error  "The given key was not present in the dictionary" and other instance was able to work through.

    Are there any CRM Configuration set up for this option to work?? I never came across such a option, but seems like......there is different between this 2 instances as far as Create Plugin behavior goes for CRM Explorer.

    Thanks,
    Nick
    • Marked as answer by Nicksoft2011 Tuesday, April 29, 2014 4:12 PM
    Tuesday, April 29, 2014 3:50 PM

All replies

  • I see you are registering the assembly in the Sandbox.  If you are referencing classes/types/methods from an external assembly (that is not native CRM or Sdk) you will have to merge the referenced assembly with your plugin assembly using ILMerge, then register the resulting assembly in the Sandbox.
    Tuesday, April 29, 2014 1:13 PM
  • Thanks JBlaeske. But I don't have any external Assembly. All I have is just one new cs file for that plugin code as shown below.

    Tuesday, April 29, 2014 1:39 PM
  • Can you manually register the assembly using the Sdk Plugin Registration tool?  I have found that if the Plugin signature changes you will have difficulty updating the assembly.  You may have to unregister the assembly itself first.
    Tuesday, April 29, 2014 1:48 PM
  • Tim,
              I was able to work around. I had 2 separate instances of CRM 2013, so I connected to other CRM instance and able to use CRM Explorer and just right click on Account Entity and selected "Create Plug-in" option, which allowed me to create separate plugin. Then I modified the plugin code and able to test on this instance. Then I switch to other Instance and able to deploy without issue and tested successfully.

    But strange thing , is One instance CRM Explorer doesn't work for "Create Plug-in" option and throws error  "The given key was not present in the dictionary" and other instance was able to work through.

    Are there any CRM Configuration set up for this option to work?? I never came across such a option, but seems like......there is different between this 2 instances as far as Create Plugin behavior goes for CRM Explorer.

    Thanks,
    Nick
    • Marked as answer by Nicksoft2011 Tuesday, April 29, 2014 4:12 PM
    Tuesday, April 29, 2014 3:50 PM