• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Using Entity Framework in CFD code

Status
Not open for further replies.

Michael Gaillez

Joined
Apr 10, 2018
Messages
5
Reaction score
0
Hello,

Can I use Entity Framework in code used in the call flow designer?

I see the dll is present in /usr/lib/3cxpbx but what version do I need to use?

Tnx,

Michael
 
Yes I have read that article but 3CX /usr/lib/3cxpbx folder contains an Microsoft.EntityFrameworkCore.dll. That version is 2.0.0. Using entity framework version 1.0 would require me to overwrite that file but I guess that is not such a good idea :) So how to overcome this?

Also setting the library to .NET CORE 1.0 gives me this error in CFD "uses 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.0.20.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'". Applying .NET Standard 1.3 resolves this issue
 
Last edited:
OK, let me explain what you need to do. At the moment, CFD apps are .NET Core 1.0 DLLs. In the near future we will update the CFD to produce .NET Core 2.0 DLLs. This is like this because until 3CX v15.5 SP2, 3CX was running on .NET Core 1.0, and now it has been upgraded, so we need to also update the CFD. Until we do this, the apps are .NET Core 1.0 and are loaded by 3CX without any problem as they are compatible.

So, in order to work with the CFD, you need to use .NET Core 1.0 DLL references, and then in 3CX the version 2.0 will be used. As a result, you need to download from Nuget the DLL for .NET Core 1.0 and copy it to the CompilerDependencies folder into the 3CX CFD installation folder. This way, the DLL is used to build the app, and in runtime the DLL 2.0 will be taken from the 3CX installation folder.

In order to get the right DLL from Nuget, you just need to create a project with Visual Studio adding a reference to the library you need. Then nuget will download all the versions of the DLL and you can copy the version you need from there. For example, nuget will download the DLLs to the following folder:
C:\Users\USER_NAME\.nuget\packages\PACKAGE_NAME\PACKAGE_VERSION\lib\netstandard1.6

You need to get the DLL for netstandard1.6 or netstandard1.3, check which folder you have.

Kind regards.
 
Hello,

When I copy the files to /usr/lib/3cxpbx the 3CXQuemanager.log keeps telling me it cannot find the file :-(

Error message : "System.IO.FileNotFoundException: Could not load file or assembly 'PhoneNumbers, Version=8.9.3.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified." I copied the packed .netstandard1.3 file to /usr/lib/3cxpbx with WinSCP.Capture.JPG
 
Yes, you can't add your own DLLs to the 3CX bin folder. The QueueManager service will not load it. You can try to add a script to load the assembly from a specific location.
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Forum statistics

Threads
141,625
Messages
748,894
Members
144,739
Latest member
Ghisl1
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.