Coding on C# for SBC4 phidget22.dll Assembly Not Found

Supporting Visual Studio on Windows
Post Reply
ggalanprytimemedical
Phidgetsian
Posts: 5
Joined: Fri Jul 15, 2022 5:44 pm
Contact:

Coding on C# for SBC4 phidget22.dll Assembly Not Found

Post by ggalanprytimemedical »

I am getting this error.
I have Mono installed.
A simple Hello World (via Console.WriteLine) works fine.
Console.WriteLine("My Phidget...");

The problem is when I add code to interact with phidgets,
LCD lcd = new LCD();

The error comes. I noticed this Library is under the folder dll (inside the bin/release folder). I have tried to copy the same folder structure over the project in the SBC itself, or in the main folder where the executable and the Phidget22.***.dll are.


Unhandled Exception:
System.DllNotFoundException: phidget22 assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetLCD_create(intptr&)
at Phidget22.LCD..ctor () [0x00006] in <de87432ccf9f42d49d62adc54521257b>:0
at ConsoleAppSBC_02.Program.Main (System.String[] args) [0x0000a] in <d1614319a023445e85bcbc9e20a0b8a3>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: phidget22 assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetLCD_create(intptr&)
at Phidget22.LCD..ctor () [0x00006] in <de87432ccf9f42d49d62adc54521257b>:0
at ConsoleAppSBC_02.Program.Main (System.String[] args) [0x0000a] in <d1614319a023445e85bcbc9e20a0b8a3>:0

Anyone any idea how to overcome this problem.

Thanks
fraser
Engineering
Posts: 324
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: Coding on C# for SBC4 phidget22.dll Assembly Not Found

Post by fraser »

As a starting point, make sure you've gone through all the steps from the Linux Mono guide on this page:

https://www.phidgets.com/docs/Language_-_C_Sharp

Notably the reference to

Code: Select all

 mcs Program.cs -r:Phidget22.net.dll
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests