Unexpected exception from plug-in (Execute): System.MissingMethodException: Method not found: ‘!!0[] System.Array.Empty()’.

For a demo I was writing a workflow activity and got the error:

Unexpected exception from plug-in (Execute): WorkFlowComponents.DeleteUnwantedPotentialLeads: System.MissingMethodException: Method not found: '!!0[] System.Array.Empty()'.

It was happening becasue my assembly version was not supported by Dynamics 365. As per this document Dynamcis 365 supports .Net Framework 4.5.2.

Corrected target .Net framework, redeployed assembly and same code started working as expected.

Hope it will help.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s