.Net (Core) 6 on Linux

Supporting Visual Studio on Windows
Post Reply
cvboucher
Phidgetsian
Posts: 14
Joined: Fri Oct 22, 2021 11:29 am
Contact:

.Net (Core) 6 on Linux

Post by cvboucher »

Should the .Net Phidget libraries work on Linux? I've included the Phidget22.NET Nuget package in my project and ran the Linux install scripts on my device (Raspberry Pi). But I'm getting an exception:

Code: Select all

---> System.DllNotFoundException: Unable to load shared library 'phidget22' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libphidget22: cannot open shared object file: No such file or directory
    at Phidget22.Phidget22Imports.PhidgetManager_create(IntPtr& phid)
    at Phidget22.Manager..ctor()
The Phidget libraries work great when I run my application on Windows. Also, my app runs fine on Linux if I don't make any calls to the Phidget libraries.

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

Re: .Net (Core) 6 on Linux

Post by cvboucher »

I got this working. In addition to the Phidgets library, I was using the Networking and Manager libraries. So I had to also install libphidget22extra and libphidget-dev.

Code: Select all

sudo apt-get install -y libusb-1.0-0-dev
curl -fsSL https://www.phidgets.com/downloads/setup_linux | sudo -E bash -
sudo apt-get install -y libphidget22
sudo apt-get install -y libphidget22-dev
sudo apt-get install -y libphidget22extra
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: .Net (Core) 6 on Linux

Post by Patrick »

libphidget22extra shouldn't be required - this is used by our network server, but not required for network clients.

libphidget22-dev is required for .NET to find the C library.

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest