Page 1 of 1

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

Posted: Mon Aug 01, 2022 3:12 pm
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

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

Posted: Tue Aug 02, 2022 7:19 am
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