C# Script invoking another dll

Discussion in 'Call Flow Designer' started by obsidian, Jun 24, 2017.

Tags:
Thread Status:
Not open for further replies.
  1. obsidian

    Joined:
    Oct 6, 2014
    Messages:
    3
    Likes Received:
    0
    Hello,

    I am trying execute an external C# script:

    using VAD.Monkey.Core;
    namespace VAD.Monkey
    {
    public class InvokeSomething
    {
    public int InvokeGetData(int data)
    {
    return DoSomething.GetNumber(data);
    }
    }
    }


    As you can see the method DoSomething.GetNumber(data) is in the VAD.Monkey.Core dll.

    My question is where do we put references to external dlls? I tried putting the VAD.Monkey.Core dll in the Library folder and also the source folders. But that did not work. With VAD in V14 we were able to directly reference dll's but it seems that in this version we can only reference .cs files.

    We want to execute code that has multiple projects and multiple dependencies. How do we do this?

    Thanks in advance,

    Jason
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,055
    Likes Received:
    75
    Hello Jason,

    Please take a look at this article:
    https://www.3cx.com/docs/manual/cfd-troubleshooting/

    You need to perform 2 steps:
    1. Copy your DLL to the CompilerDependencies folder in the CFD installation folder. Thia way the CFD can build the project.
    2. Copy your DLL to the 3CX server so it can be found in runtime (check the article for the location in the server).

    Please note that your DLL must be .NET Core code. If it's .NET framework it will not work, so you might need to migrate it.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. obsidian

    Joined:
    Oct 6, 2014
    Messages:
    3
    Likes Received:
    0
    Thank you so much. I used .NETStandard 1.3 for the dll that I was trying to reference and it worked.
     
Thread Status:
Not open for further replies.