Hello,
I have written a custom workflow activity that references Microsoft.Office.Interop.Excel library. Since we are on Online 2016 version and I have to register the workflow in Sandbox mode, I have used ILMerge to merge my custom workflow library with Microsoft.Office.Interop.Excel library and registered using plugin registration tool. But the workflow fails to execute by throwing following error during runtime :
Unexpected exception from plug-in (Execute): MyCompany.Workflows.FormData: System.TypeLoadException: Could not load type 'Microsoft.Office.Interop.Excel._Application' from assembly 'MyCompany.Workflows.Merged, Version=1.0.0.0, Culture=neutral, PublicKeyToken=9ecbe5344ab2614e'. The type is marked as eligible for type equivalence, but the containing assembly is not loaded as fully trusted.
Note : I have used a .snk file to sign the merged assembly during ILmerge. This is the command i used to merge the dlls :
ilmerge /keyfile:MyWorkflows.snk /target:library /copyattrs /targetplatform:v4 /out:MyCompany.Workflows.Merged.dll MyCompany.Workflows.dll Microsoft.Office.Interop.Excel.dll /allowdup
Any suggestion would be very helpful. Thanks in advance for your time.
Regards,
Pradeep
*This post is locked for comments