Can I use a NuGet (EvsCerebrum.InterappAPI) that has both SLProtocol and Engine in an automation script?
In my automation script, I have below exception.
The type 'SLProtocol' is defined in an assembly that is not referenced. You must add a reference to assembly 'SLManagedScripting, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
These are the NuGets I use in my automation script.
Introducing a new class tailored to the Engine solved the problem.
Changed:
public class EvsCerebrumClient
{
private readonly SLProtocol protocol;private readonly Engine engine;
public EvsCerebrumClient(SLProtocol protocol)
{
this.protocol = protocol;
}public EvsCerebrumClient(Engine engine)
{
this.engine = engine;
}
}
To:
public class EvsCerebrumClient
{
private readonly SLProtocol protocol;public EvsCerebrumClient(SLProtocol protocol)
{
this.protocol = protocol;
}
}public class EvsCerebrumEngineClient
{
private readonly Engine engine;public EvsCerebrumEngineClient(Engine engine)
{
this.engine = engine;
}
}
I moved everything related to Engine to another class in the NuGet and now it works.