At times, if you realize you need to rename your plugin but get error while updating it in the Plugin Registration Tool, then this post might help you out!
Let’s see how we correctly rename the plugin in question and update it. Most times, if you encounter this error, make sure you follow the post to be able to successfully perform this operation.
At times, there are scenarios where you need to rename a Plugin just because the naming convention has not been followed in the Plugin Assembly because multiple developers were contributing or just because you came up with a better name altogether –
- Let’s assume this is the name given originally in a plugin
- And you want to rename it to, say “AccountValidation“
So, you typically would rename the class file in the Plugin Assembly (Class Library)
- And it’ll ask you for the confirmation to update the name of the class as well.
- And once you confirm, the class will be renamed as well.
- Now, when you try to Build the solution & update the assembly again, it’ll show you your renamed plugin which you are trying to update.
- But, when you try to Update the Selected Plugin, it’ll give you the below error.
[The previous Plugin name] not found in PluginAssembly [PluginAssembly details] which has a total of [x] plugin/workflow activity types.
Let’s see how to overcome this.
So, here’s how you successfully update the plugin assembly with the renamed plugin.
- Unregister the Plugin only which was renamed.
Please make sure you note all the Steps and Images with that plugin since you’ll need to manually add them back again once the new renamed plugin is registered. It’s a new registration and not updating the existing plugin which was previously registered.
- Now when you unregister, re-update the Assembly in which the renamed plugin will be registered as a new plugin. Post which, you’ll need to add the necessary steps/images to it.
Deleting a Plugin
The approach to deleting a Plugin from the Assembly is also no different –
- Let’s say you have another plugin called as “ContactUpdate“, and you want to delete it to declutter your assembly from plugins which you don’t need at all.
You select the Class file in Visual Studio and Delete it.
- It’ll prompt you that you are permanently deleting the file and it can’t be reverted.
- Once this is deleted, and you build the solution again and Update the Assembly, you’ll find that the plugin you deleted will be missing for an update. And that’s when you’ll see another error as the Assembly update in the Plugin Registration Tool will try to update the plugin you just deleted.
- Just like how we Unregistered in the rename process above, you’ll need to Unregister the plugin first in order to Update the rest of the plugins successfully in the Assembly.
- And finally, you’ll be able to update the assembly for the rest of the Plugins in the assembly post deleting the plugin.
Also, another way is to also follow the below –
- Create a new plugin with the name you wish to set.
- Copy the code over the new plugin and register it in the Plugin Registration Tool.
- Once done, replicate the Steps/Images on the new plugin in the Plugin Registration Tool.
- Now, you can also safely delete the old plugin which has the old name.
- Delete from the Code and then from the Registration Tool and then update so that the library too is updated with the deleted one as well!
Hope this was helpful! Here are some more Dynamics 365 posts which you might be interested in –
- Dynamics 365 Storage Utilization | Dataverse Storage | Power Platform Admin Center
- Use Hierarchy in Roll Up Fields in Dynamics 365 CRM
- Filter records in a View owned by a Team you are a member of | Dynamics 365 CRM
- Get GUID of the current View in Dynamics 365 CRM JS from ribbon button | Ribbon Workbench
- Dynamics 365 App For Outlook missing on SiteMap in CRM? Use shortcut link [Quick Tip]
- Import lookup referencing records together in Dynamics 365 CRM | [Linking related entity data during Excel Import]
- Mailbox Alerts Hide/Show behavior in Dynamics 365 CRM
- Excel Importing Notes (Annotation) entity in Dynamics 365 CRM
- Enable/Disable the need to Approve Email for Mailboxes in Dynamics 365 CRM CE
- Call Azure Function from Dynamics 365 CRM using Webhooks
- Show Ribbon button only on record selection in Dynamics CRM
- Accessing multiple occurrences of a field in Business Process Flow using JS in D365 CRM