SBX - Search With Button

SBX - Forum Post Title

Update of single plugin in Crm DeveloperToolKit , updates all the plugins in the assembly.

Microsoft Dynamics CRM Forum

User_28 asked a question on 16 May 2019 3:00 AM

Question Status

Verified

Hello all,

I have recently started using CRM DeveloperToolKit for deploying my plugins.

It gives an option for deploying single plugins(in one assembly)

Below is a weird behavior that I am not able to understand: 

Steps :

In the CRMDeveloperToolKit - deploy 2 plugins in the same assembly . 

We change the content for both the plugins and only deploy one of them (with the single deploy option CRM Tools-> Deploy ).

Expected : Only one plugin should be updated and the previous plugin's functionality should remain as is.

Actual : Both the plugins get updated. We can verify this using the Plugin Trace log.

Is there any way we can update only 1 plugin in an assembly.

Reply
Radu Chiribelea responded on 16 May 2019 12:00 PM
My Badges
Verified Answer

Hello,

Since you only have one plugin assembly (dll), the changes you make there impacts all the plugins registered for that assembly. What you are seeing is expected behavior.

What you'd like to achieve could be done via different plugin assemblies (dll) and isolate the plugins one from each other.

Regards,

Radu

Reply
Temmy Raharjo responded on 17 May 2019 12:44 AM
My Badges
Suggested Answer

Split your plugin into 2 different DLL. No other way.

Reply
User_28 responded on 17 May 2019 2:37 AM

If this is the expected behavior. I don't see a reason why they have an option for deploying a single plugin, (In the deploy solution page or by Crm Tools-> Deploy) when there is no way to deploy(Update) that plugin only.

Deploying the plugin for the first time(creating new single plugin) as far as I can see, works fine , the issue is when we try and update a single plugin.

Reply
Verified Answer

Hi

CRM will not keep different versions of DLLs, it will only use one version of the DLL and that's why all get updated. I don't think there is a way around this unless you separate your code into multiple DLLs.

When you deploy from Visual Studio using the developer toolkit, it will overwrite the DLL with a new version effectively updating all the steps.

Reply
Shidin Haridas responded on 17 May 2019 2:53 AM
My Badges
Verified Answer

As everyone else suggested, this is expected behavior.

Similar to deploying workflows from one instance to the other, results in the original workflow being replaced, even if no changes are made.

As long as the GUIDs (of the workflows/plugins) are same, it doesnt matter.

The registration tool does more of an Upsert action. Creates new plugins/plugin steps and updates the existing ones.

If my answer helps you, please mark as verified as this will help other users in the community to resolve the same or similar issues.

Reply
User_28 responded on 17 May 2019 4:24 AM

Even though I understand that this is the expected functionality, what I don't understand is why is there a separate Deploy page for deploying single plugins. This seems very misleading as a developer.

Reply
Dynamics365 Rocker responded on 17 May 2019 6:08 AM
My Badges
Suggested Answer

One plugin assembly can have multiple plugins.

Hence all plugins in assembly will be updated.

To avoid it you can comment your new code that you do not want to deploy.

Reply
Radu Chiribelea responded on 16 May 2019 12:00 PM
My Badges
Verified Answer

Hello,

Since you only have one plugin assembly (dll), the changes you make there impacts all the plugins registered for that assembly. What you are seeing is expected behavior.

What you'd like to achieve could be done via different plugin assemblies (dll) and isolate the plugins one from each other.

Regards,

Radu

Reply
Verified Answer

Hi

CRM will not keep different versions of DLLs, it will only use one version of the DLL and that's why all get updated. I don't think there is a way around this unless you separate your code into multiple DLLs.

When you deploy from Visual Studio using the developer toolkit, it will overwrite the DLL with a new version effectively updating all the steps.

Reply
Shidin Haridas responded on 17 May 2019 2:53 AM
My Badges
Verified Answer

As everyone else suggested, this is expected behavior.

Similar to deploying workflows from one instance to the other, results in the original workflow being replaced, even if no changes are made.

As long as the GUIDs (of the workflows/plugins) are same, it doesnt matter.

The registration tool does more of an Upsert action. Creates new plugins/plugin steps and updates the existing ones.

If my answer helps you, please mark as verified as this will help other users in the community to resolve the same or similar issues.

Reply
Temmy Raharjo responded on 17 May 2019 12:44 AM
My Badges
Suggested Answer

Split your plugin into 2 different DLL. No other way.

Reply
Dynamics365 Rocker responded on 17 May 2019 6:08 AM
My Badges
Suggested Answer

One plugin assembly can have multiple plugins.

Hence all plugins in assembly will be updated.

To avoid it you can comment your new code that you do not want to deploy.

Reply

SBX - Two Col Forum

SBX - Migrated JS