Error registering plugins and/or workflows. Plug-i

2019-02-16 18:05发布

I implemented one custom workflow in in Visual Studio 2010 using CRM 2011 Developer Toolkit. It was working fine with system generated namespace. But, when I changed the namespace of my project, its throwing an error "Error registering plugins and/or workflows. Plug-in assembly does not contain the required types or assembly content cannot be updated." while deploying it. And I have changed the namespace in .crmregister file, project properties and in source code. Then whats the problem here.?

15条回答
Animai°情兽
2楼-- · 2019-02-16 18:15

I just encountered the exact same issue while toying with the CRM Toolkit.

This is how I solved the issue:

  1. Go to Settings/Solutions/Yoursolution in CRM
  2. Delete the SDK message processing entries related to the Plugin assembly
  3. Delete the plugin assembly itself from the solution
  4. Go back to Visual Studio and Deploy

I didn't have to manually edit anything.

查看更多
Animai°情兽
3楼-- · 2019-02-16 18:18

If you had some automatically generated classes, e.g. Plugins which you had created via right-click Create Plug-in and then you've deleted it, you have to cleanup it's traces in RegisterFile.crmregister. If it was a plugin, you need to delete a whole branch with it's name.

查看更多
三岁会撩人
4楼-- · 2019-02-16 18:21

Make sure that your plugin/workflow class is a public class.

I got the same error because my plugin class was private.

查看更多
叛逆
5楼-- · 2019-02-16 18:21

Check RegisterFile.crmregister workflow property TypeName must not contain any spaces.

查看更多
对你真心纯属浪费
6楼-- · 2019-02-16 18:21

I changed the signing key file and got the error, changing it back to the previous key file solved the issue for me.

查看更多
Summer. ? 凉城
7楼-- · 2019-02-16 18:23

This can happen if you change/refactor the main class name of your plugin. (e.g. when the code analysis complains you have a spelling mistake and you fix it) This problem will only show up next time you do the deploy

So if you've chnaged the name of your plugin class...

  1. In the Default CRM Solution delete your plugin from "Plugin-in Assemblies"
  2. Look in the RegisterFile.crmregister file of your plugin. on the XML tag you will see 3 references to your class name - some of these may not have been updated.
  3. update the names in this file and redeploy.

done.

(ok just noticed Masoud Ghabachi mentioned this ages ago...)

查看更多
登录 后发表回答