I'm retrieving the following message when I use classes from a C++ subproject on a Windows Phone 8.1 app (winrt, no silverlight):
(System.IO.FileNotFoundException) "The specified module could not be
found. (Exception from HRESULT: 0x8007007E)"
I had this error before, when I was developing the same app for W8.1 (Desktop, x86 and ARM). I solved that issue with the procmon.exe (Process Monitor) which logs any searched library and its result (found / not found).
With procmon.exe tool I found the libraries which aren't found (curl, websockets, ogg, sqlite3), and I added to the main project root. That solved the Desktop Issue.
Now I'm porting that developed app (Windows 8.1 desktop) to WindowsPhone 8.1 winrt (no silverlight).
I'm getting the same problem, and I added the same libraries than the Desktop project (curl, websockets, ogg, sqlite3), but It sill throwing the same exception (that libraries are loaded, because if I add the x86 version, on a ARM build, then, throws "BadImageException" instead).
EDIT 1:
Let me give you a breakdown of the project structure:
- AppCS: C# startup project. Targets Windows Phone 8.1 (winrt, no silverlight).
References AppCS & has the following dlls as content:
ogg:
libogg.dll
libvorbis.dll
libvorbisfile.dll
websockets:
libwebsockets.dll
curl:
libcurl.dll
libeay32.dll
ssleay32.dll
sqlite3:
sqlite3.dll
AppCPP: C++ dll library. Targets Windows Phone 8.1 (v120_wp81 toolset).
This is the game core. References libcocos
libcocos: dll library; shared project between Windows Phone 8.1 (v120_wp81) & Windows 8.1.
This is the game engine, where I'm assuming the dlls (from AppCS) are being used.
Any suggested solution/tool for solve it?
Finally I could fix the issue. As expected I wasn't attached the properly dll.
It seems there isn't a cool/easy way to detect it, so, you should identify it on a mostly empty test project:
https://social.msdn.microsoft.com/Forums/windowsapps/en-US/968eecee-a1f8-456f-886d-5600c8968fb2/wp81-c-project-crash-when-using-c-project-systemiofilenotfoundexception?forum=wpdevelop#968eecee-a1f8-456f-886d-5600c8968fb2
Related
I'm trying and setting up an Azure App Service database (easy table) integration on my Xamarin Forms App, following the instructions I found on these two posts: this one, by James Montemagno, and the one I found on a Xamarin Developer Guide.
Now, everything works fine on the Android App but I've got an issue on Windows Phone 8.1: I can build my app, but it crashes when executing the var something = new MobileServiceSQLiteStore(path); instruction ({"Unable to load DLL 'e_sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}).
Here's my SQLite & Azure-related reference:
.
Any idea on why this issue is happening?
Thanks!
Jacopo
UPDATE - 25/11/2016
I tried building the same project with the same libraries in Windows UWP, and it works.
Is there a WP 8.1 non-compability with the Microsoft.Azure.Mobile.Client.SQLiteStore I couldn't find any reference about, maybe?
Could this issue be related to the Visual C++ 2015 Runtime Package (UWP) vs the Visual C++ 2013 Runtime Package one (WP8.1)?
I have created a windows phone App 8.1 with xamarin shared project. After creating the XAP file, I tried to install in the WP device using Windows Phone 8.1 Deployment tool. It is being installed without any problem.
But if I install the same using different machine and device it shows the following error.
Native Images generated against multiple versions of assembly System.Net.Http.Phone
I checked this and this, but could not make out since the difference in assembly.
Should I need to do something in the other machine or need to do something in my development machine to get this thing done. Please Help :(
i want to import some C++ unmanaged dlls into my windows phone app. can i do this ?? while debugging the dll not found exception thrown. can anyone help me to where do i place my those dependency dlls .
thank you ...
It depends on the DLL. If the DLL is built using only API available to Windows Runtime apps then you can use it. See Win32 and COM for Windows Runtime apps on MSDN for a list of the available API. You won't be able to use a DLL built for a desktop system (you cannot run x86 or x64 on ARM) but will need a specific phone build.
To use it you will need to include it in your appx package. In Visual Studio's Solution Explorer add the DLL to your project and edit its properties to mark its Build Action as Content. When you build the app check to make sure it is in the appx directory. That will deploy the DLL with the app so it is available at runtime.
For me it was due to having WIC code in my App and/or calling CoCreateInstance in a windows phone environment ( on PC it works flawlessly though )
I have a C++ (Native code) DLL project developed for iOS and Android. I would like to port it to a C++ DLL (Universal Apps) to be consumed by a C# Universal Store Application. The code isn't HW dependent.
As a first step, before moving all the code, I created a small test solution as follows:
I created a C++ DLL (Universal Apps), myDll, that has a C++ Add1(int, int) function.
I created a C++ WinRT component (Universal Apps) that has C++ Add2(int, int) function.
I created a C# Universal Application, myApp, that calls Add2 which calls Add1.
Compilation passes OK, however when I run myApp the application crashes and report that myDll wasn't
loaded.
My questions are:
Is the scenario I described above possible? And If so, what can be the problem causing myApp to crash?
Is there a better way for me to port the iOS/Android C++ code to be consumed in a C# Universal Application?
Thx
1) Like Hans, my first guess is that you're not including the Dll in the apps package. If it's not deployed in the package it isn't available to be loaded. Since you can't add a reference to the DLL you'll need to add it explicitly:
Add the files to the project, open the files' properties in the Solution Explorer window, and mark them as content to be included in the app package.
Check that out is actually in the appx dir after you deploy.
2) That's probably the easiest. You could also include just the Dll and pinvoke. Either way you'll need to make sure the dll is valid for Windows Store apps
I have a WPF C# application that makes use of the InkAnalyzer class. On my development platform (Windows XP), I have added references to IACore.dll and IAWinFx.dll for the project before building the release.
However, when I tried to run this on a HP TouchSmart tablet PC (on Windows Vista), the application throws a "FileNotFoundException". Offending file name is IACore.dll.
Next, I selected the "Copy Local" option for both files, and rebuilt the application. However, once that is done, yet another file is not found. This time it is "IALoader.dll".
I realise that I must be missing something on the HP TouchSmart (on Windows Vista). Is the Vista laptop missing a SDK?
A Solution
I couldn't find IACore.msm anywhere on my SDK, and it's a recent SDK (XP Tablet PC SDK version 1.7), so I used Search to find the IALoader.dll, and manually copied it to my application's folder. No more complaints after that.
However, if there's a way for me to avoid bloating my application deployment with these files, it would be great. Thanks for your help, Jared!
Looks like this problem was encountered by a few other people as well. The basic problem is that the assembly is not installed in the GAC but in the Windows SDK directory. In order for your application to ensure it's loaded it must include the IACore.msm in the setup project or manually install the framework.
Full Thread:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/719cbbde-013e-4165-b694-6a994d833352/