Hello,
I encountered an error while implementing OnArgumentsProcessed:
Could not load the file or assembly SLManagedAutomation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null or one of its dependencies. An attempt was made to load a program with an incorrect format.
This happens when using an ad hoc data source. I tried changing the Platform target, but that didn’t resolve the issue. Interestingly, removing lines that call List<T>.AddRange(IEnumerable<T>) makes the error disappear.
Any ideas on the root cause and how to fix it?
Hi Sara
I'm not sure why the AddRange method you're referring to, is causing this particular behavior. Based on the error you have included though, I believe your ad hoc data source has a reference to the Skyline.DataMiner.Dev.Automation Dev Pack.
An ad hoc data source can't load that Dev Pack since it's being used in one of the GQI processes and is unable to use any Automation related functionality. Could you try to remove that Dev pack and any functionality in your data source that makes use of it?
To interact with DataMiner you can have a look at the following page on the docs: Building a GQI data source that retrieves data from a DMS.
If this still doesn't work out for your data source, could you reply with a snippet that include the AddRange call and the namespaces that are used?

Hello Peter,
In the meantime, I discovered that issue was caused by other method that was using engine. Thank you for explanation, removing dev pack would help me discover the issue earlier.