.NET Core and Linux

Supporting 2.6 and up
Post Reply
egbertn
Fresh meat
Posts: 4
Joined: Tue Apr 12, 2022 4:42 am
Contact:

.NET Core and Linux

Post by egbertn »

Hey there,
.NET Core is already supported on Linux for 'ages', lol, though still, I can only use Phidget22 with C# on Windows.

Installing libphidget22 on linux, seems to only be for C/C++.

Any plans or solutions to get it working on Linux?

Thanks
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: .NET Core and Linux

Post by Patrick »

You can grab the .NET library here or install from nuget - both includes .NET Core versions. libphidget22 is the C library - the .NET library is a wrapper around the C library, so both are needed.

-Patrick
egbertn
Fresh meat
Posts: 4
Joined: Tue Apr 12, 2022 4:42 am
Contact:

Re: .NET Core and Linux

Post by egbertn »

Thanks, the c library is in fact included in the Phidget22 package.
Microsoft.OpenApi.dll localhost.pfx
Newtonsoft.Json.dll runtimes
Phidget22.NET.dll web.config
root@SandboxHost-637853704456090895:/app# cd dll
root@SandboxHost-637853704456090895:/app/dll# ls
x64 x86
root@SandboxHost-637853704456090895:/app/dll# cd X64
bash: cd: X64: No such file or directory
root@SandboxHost-637853704456090895:/app/dll# ls
x64 x86
root@SandboxHost-637853704456090895:/app/dll# cd x64
root@SandboxHost-637853704456090895:/app/dll/x64# ls
phidget22.dll
root@SandboxHost-637853704456090895:/app/dll/x64#
I also installed the library as indicated

RUN curl -fsSL https://www.phidgets.com/downloads/setup_linux | bash -
RUN apt-get install -y libphidget22

But still, when the c# activates e.g. a Current
using CurrentInput ci = new ();
ci.Open();
I use .NET 5.0.15
And Ubuntu 20.04

It will cause an exception that phidget22 library is not found.
According to my best knowledge, nothing else should be required.
Please advise.
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: .NET Core and Linux

Post by Patrick »

Hi,

I'll have a try with .NET Core and see why it's having trouble finding the C library on Linux. The C dll included in the nuget package is for Windows only.

-Patrick
egbertn
Fresh meat
Posts: 4
Joined: Tue Apr 12, 2022 4:42 am
Contact:

Re: .NET Core and Linux

Post by egbertn »

cvboucher
Phidgetsian
Posts: 14
Joined: Fri Oct 22, 2021 11:29 am
Contact:

Re: .NET Core and Linux

Post by cvboucher »

Any updates on this? I have a .Net 6 app that's running on Linux and I need to add Phidget support. It's currently throwing an exception on Linux that it can't find the library. It runs successfully on Windows.

Thanks,
Craig
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests