Comments (7)
Can you provide a bit more of information on which error you got? We've been using imobiledevice-net on .NET 4.6.2 for quite a while without issues.
from imobiledevice-net.
Ok this really strange.
After reading your response i jumped back to my little project solution and tried to retarget first to 4.5 then 4.6 and surprisingly it worked.
Created three new projects from scratch 4.0 4.5 4.6 and added imobiledevice-net package from nuget to the three of them. Run them and got the runtime exception on all three
System.DllNotFoundException: 'Unable to load the DLL 'libimobiledevice': Unable to find specified module. (Exception from HRESULT: 0x8007007E).'
The code i'm using is this
NativeLibraries.Load();
deviceApi = new iDeviceApi(LibiMobileDevice.Instance);
deviceApi.idevice_event_subscribe((ref iDeviceEvent devEvent, IntPtr data) =>
{
switch (devEvent.@event)
{
// switch code here ...
}
}
the exception shows up as soon as i call idevice_event_subscribe
method
from imobiledevice-net.
It looks like it's loading the 64-bit imobiledevice.dll on 32-bit .NET or the other way around.
Can you change your project to target x64 or x86 instead of Any CPU?
from imobiledevice-net.
After some tests, including changing the target to x64, what I discovered is that if I manually copy all the contents from the win7-x64\native
folder directly inside my bin/Debug one
, it works but for instance, if only copy that libimobiledevice.dll
it keeps crashing when i launch it.
from imobiledevice-net.
@stefanodriussi Yes, you need all files from the win7-x64\native
folder for it to work. libimobiledevice.dll
depends on some other .dll
files, so that's why you get that behavior.
Out of curiosity, which version of the NuGet package are you using?
from imobiledevice-net.
@qmfrederik sorry for the late response.
I'm using NuGet package version 1.2.0.112
from imobiledevice-net.
I've noticed a strange behavior:
if I copy all the assemblies (from the correct architecture folder) inside my application root folder, everything works but if i delete the original native folder it throws an exception
.
If I delete everything from that folder and leave it empty, apparently the previous check goes through and it loads the libraries.
from imobiledevice-net.
Related Issues (20)
- Questions about instproxy_client_options_add
- A node of type plist is expected when instproxy_client_options_add is used
- anyone know how to extract battery serial number from AppleDiagnosticDataSysCfg
- getting list of devices in recovery mode?
- donet 5.0 support? HOT 1
- I really need help with activating a device
- ERROR: Install failed. Got error "APIInternalError" with code 0x00000000
- unable to get ios device id (udid) after connecting iOS device to windows 10 machine using USB cable. application is working in debug mode in visual studio, but not working in release build (without using visual studio) HOT 1
- afc_file_write function is not exiting when iphone is removed in between.
- Where is the .h file?
- Not compatible with .NET Maui mac-catalyst workload HOT 1
- macOS idevice_id openssl error HOT 1
- Invalid message _rpc_reportCurrentState. On my phone, the Safari Web Inspector is ON. HOT 1
- How do I save a screenshot? HOT 1
- MacCatalyst binary distribution
- file_relay_request_sources code error.
- Installing via NuGet is blocked by Windows virus scanner
- iMobileDevice-net not compatible with Mac-M1
- I get an error
- How to copy the native libraries when I publish the project with -r linux-x64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imobiledevice-net.