System.DllNotFoundException: phidget22

Supporting Visual Studio on Windows
zain alvi
Fresh meat
Posts: 1
Joined: Sat Jun 09, 2018 6:04 am

System.DllNotFoundException: phidget22

Postby zain alvi » Sat Jun 09, 2018 6:16 am

I'm trying to use "PhidgetSpatial Precision 3/3/3 High Resolution" with an Android application developed in C# using Xamarin in Visual Studio.

At the start of program, I've referred to Phidget22.NET.dll, then I've initialized Magnetometer like this:

Code: Select all

 Magnetometer mag = null;
 mag = new Magnetometer();

it gives me an error
System.DllNotFoundException: phidget22

Can you please guide me on this?


Fresh meat
Posts: 2
Joined: Thu Feb 27, 2020 11:04 am

Re: System.DllNotFoundException: phidget22

Postby JonasPR » Thu Feb 27, 2020 11:10 am

Hi Zain,

did you ever figure this out? I just hit it today.

Even though the Phidget22_Net_dll" and "Phidget22_Net_dll_mdb" are in the androids _override_ directory along with all of the other dlls, it doesnt look like it gets loaded.

User avatar
Lead Developer
Posts: 3207
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada

Re: System.DllNotFoundException: phidget22

Postby Patrick » Thu Feb 27, 2020 12:21 pm

This is not a configuration that's been tested by Phidgets.

What's missing is the Android native C library phidget22.

You will need to download the Android library package: ...

This contains the Android Java library, as well as the native library for all architectures: You will need to rename this to and put it in a path where the Xamarin application will find it - You will need to find documentation for loading native libraries from Xamarin.

This should work fine for network-attached Phidgets, but you won't be able to use USB-attached Phidgets because they are supported by a supplemental Java jar - I'm not sure if you can load jars in Xamarin?


Return to “C#.NET”

Who is online

Users browsing this forum: wuhuilin11 and 0 guests