Microsoft Dynamics: Unable to load plug-in assembly
Recently I have been working on Microsoft Dynamics 365 on-premise install for a project, and I came across an odd error when trying to assign roles to a user: Unable to load plug-in assembly.

I downloaded the error log file, and I noticed the following line:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: Assembly content(Microsoft.Dynamics.Sales.Plugins, Version=9.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) does not match the expected assembly identity (Microsoft.Dynamics.Sales.Plugins, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
So, Dynamics was expecting a different version of the Microsoft.Dynamics.Sales.Plugins.dll
. I have recently installed update 0.43 (5021376), so I was pretty sure that the install was to blame. I looked at the version information for Dynamics in the About dialog box (accessible via the gear icon at the top menu), and I noticed the following:

See how the database (DB) version does not match the installed product version. In order to fix this, I logged into the VM where Dynamics 365 is installed and I ran the Dynamics 365 Deployment Manager. Under organisations, I immediately noticed the following:

Notice how Deployment Manager is informing that an upgrade is available. So I right-clicked the organisation and selected the option to upgrade it. The process took a while, but after the upgrade the organisation database version matched the product version; both in the Deployment Manager as well as in the Dynamics 365 about box.


I then proceeded to assign roles to my users again and… voilà! System is now working as expected.