web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Plugin assembly not reloaded after update - IIS restart needed

(0) ShareShare
ReportReport
Posted on by 10

Dear community,

we use a custom tool written in C# and using the Dynamics SDK to deploy plugin assembly binaries to our Dynamics dev environment (on-premise, IsolationMode "None", SourceType "Database").

The tool simply updates the PluginAssembly entity, like:

var context = new ServiceContext(service);
var pluginAssembly = context.PluginAssemblySet.Single(pa => pa.Name == "testpluginassembly");
var upd = new PluginAssembly()
{
	Id = pluginAssembly.Id,
	Content = Convert.ToBase64String(File.ReadAllBytes("testpluginassembly.dll")),
	Description = "test plugin assembly"
};

service.Update(upd);

Note: The plugin assembly is alread present in the dev environment, as well as registered plugins, sdk message processing steps and images.

This technique used to work fine in previous Dynamics versions: After updating the PluginAssembly, the Dynamics server recognized the change and automatically reloaded the plugin assembly in IIS. The changes were effective immediately.

However, in 9.1.0007.0005 version of Dynamics 365 we need to manually restart IIS (or recycle the CRMAppPool) in order to force the Dynamics server to actually reload the plugin assembly. Otherwise the old version of the plugin assembly remains active for minutes to hours and even days.

We tried to increase the plugin assembly version number, however without any effect.

Do you know how to fix this?

Thanks and best regards,

Johannes.

I have the same question (0)
  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at
    RE: Plugin assembly not reloaded after update - IIS restart needed

    Hi,

    You will need to publish customization programmatic after updating the assembly from c#.

    www.inogic.com/.../

  • Johannes R Profile Picture
    10 on at
    RE: Plugin assembly not reloaded after update - IIS restart needed

    Hi,

    thanks for your reply.

    Publishing all customizations does not solve the problem.

    Regards,

    Johannes.

  • Suggested answer
    Johannes R Profile Picture
    10 on at
    RE: Plugin assembly not reloaded after update - IIS restart needed

    Hi,

    We found a workaround. 

    After updating the plugin assembly binaries (see above), we programmatically disable and enable a single (pseudo) SdkMessageProcessingStep. This triggers the reload of the plugin assembly by Dynamics 365.

    var context = new ServiceContext(service);
    var step = context.SdkMessageProcessingStepSet.Single(s => s.Name == PSEUDO_STEP_NAME);
    
    service.Execute(new SetStateRequest()
    {
      EntityMoniker = step.ToEntityReference(),
      State = new OptionSetValue((int)SdkMessageProcessingStepState.Disabled),
      Status = new OptionSetValue((int)sdkmessageprocessingstep_statuscode.Disabled)
    });
    
    service.Execute(new SetStateRequest()
    {
      EntityMoniker = step.ToEntityReference(),
      State = new OptionSetValue((int)SdkMessageProcessingStepState.Enabled),
      Status = new OptionSetValue((int)sdkmessageprocessingstep_statuscode.Enabled)
    });

    Best regards,

    Johannes.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 178

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 142 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans