Hi all,
We have a customer who, after upgrading to 10.4.0.0-16295-CU18 from 10.3, is suddenly getting the above error on multiple elements. We think this is causing an impact on Automation scripts using these elements. I tried the workaround in the previous dojo post How to resolve System.Reflection.ReflectionTypeLoadException? - DataMiner Dojo to no avail.
Has anyone seen this error/able to explain it/know how to prevent it?
Full error:
All of the other elements experiencing this error also have xml serializers failing.

Hi Alex,
From the lower section of the stack, the issue seems triggered by a script (CQAction::Run
) handling parameter 5003 from element HTO-1 10.1.2.1
.
If there was any update of the protocol or connector but not all its dependencies, the server may have stale or conflicting DLLs - I'd start checking from there.
HTH

It was actually a method that once modified fixed the error. See details in my comment to the question.
This ended up being fixed by adding a try/catch and ignoring types that were not found in a "DerivedTypes" method:
private static IEnumerable<Type> DerivedTypes()
{
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
foreach (var type in assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(MessageBase))))
yield return type;
}