Page 1 of 1
.NET Core and Linux
Posted: Tue Apr 12, 2022 4:44 am
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
Re: .NET Core and Linux
Posted: Tue Apr 12, 2022 9:39 am
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
Re: .NET Core and Linux
Posted: Wed Apr 13, 2022 7:27 am
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.
Re: .NET Core and Linux
Posted: Wed Apr 13, 2022 2:53 pm
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
Re: .NET Core and Linux
Posted: Thu Apr 14, 2022 5:43 am
by egbertn
Re: .NET Core and Linux
Posted: Sun Oct 16, 2022 10:55 am
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