I developed an c# application using emgucv for face detection. According to emgucv documents folder "x86" or "x64" (depending on platform for which application is running) are need to be kept parallel to executing exe. So i did accordingly and run the project, application works just fine on my machine.
If I release this c# application along with all the dependent dlls and "x86" folder and copied to an windows 7 machine, after executing the application i get error Unable to load DLL 'cvextern' : The specified module could not be found. (Exception from HRESULT: 0x8007007E)
This is what i tried to solve the error:
I copied all the DLLs from folder "x86" to executing folder (i.e outside to x86 folder) and now application runs without any error.
So I am in confusion whether to keep x86 folder in executing folder or content of x86 folder. As per my observation both are working but what is recommended?
Normally the cvextern.dll file is located in the following folder:
project_folder\bin\x86\Debug\x86
project_folder\bin\x86\Debug\x64
The same goes for the x64 version:
project_folder\bin\x64\Debug\x64
project_folder\bin\x64\Debug\x64
The folder can also contain other files, e.g. opencv_ffmpeg310.dll. The Emgu.CV.World.dll and similar DLLs are located in the Debug/Release folder (one folder up).
Not sure which version of EmguCV you are using, I am using 3.2 so everything is built for x64. When I distribute my application, I create a x64 folder in the folder where the exe lives. In this x64 folder I put ALL of the DLLs from the EmguCV distribution. On my machine EmguCV lives in:
D:\Emgu\emgucv-windesktop_x64-cuda-tbb-ipp-icc 3.2.0.2682
So from the bin\x64 folder I copy everything to where the application exe is.
Doug
Related
I'm trying to run a Console Application on Windows Server 2019 (x64).
After i run .exe on the server then writes the following error:
Could not load or assembly 'MySql.Data'
..etc for all dependencies.
I tried to run just the .exe file (i didn't copy the whole Release directory) on a few PC and it is working well. All of them Win 64bit.
On the server, .exe only work if i copy the whole /Release directory.
I also build and release app with 'Any Cpu' option.
Any tip why i need to copy the whole /bin/release directory to run .exe?
Why not enough just the .exe file?
Many thanks!
The exe file doesn't contain the used dlls, just references to the dlls. That's why they are in the release directory and the reason you need to copy the whole directory.
Kind regards
Bernd
Have I an application using sqlite...
Ive tried this:
installing via ClickOnce Application setup (it works)
I Put SQLite.dll file together with .exe in the same folder. (it works}
hmm the folder with an .exe only (not working)
What I mean is when you build the project and get the .exe on the folder \bin\Debug and move it somewhere then when you run the app errors will not occurs.
I wondering if there's a way that i can run even without installing ClickOnce Application setup?
I thinking of setup the SQLite.dll on specific path reference? Is it possible to do that?
-thanks
System.Data.SQLite.dll is not part of the standard .NET Framework so it does not get installed in the GAC of the client machines when .NET runtime is installed at first.
that's the reason why you should have this dll referenced by your executable, distributed together and in the same folder as your exe is deployed.
or you could distribute it somewhere else like in a sub-folder of your application setup and have proper entries in the configuration file or in the .NET C# code to specify where assemblies not found in the standard locations have to be loaded from.
You can use Nuget to get the package installed. For my case, it automatically created 2 subfolders for me, which is x86 and x64, I just followed the folder structure in the bin folder, and it worked fine for my case.
I have a shared library written in C++ that I'd like to use with Mono under Linux,
I follow this guide http://www.mono-project.com/Interop_with_Native_Libraries
I got it to work, but I have to put my library file into /usr/lib or /lib folder.
Is there anyway that I could distribute and use my .so files and not copy them into /usr/lib or /lib but instead into my Mono application folder ? (current directory where the app running)
some user using the software might not have root / admin access, therefore they can't install/copy the files into /usr/lib or /lib
I think you have to use the environment variable LD_LIBRARY_PATH when launching your program:
LD_LIBRARY_PATH=. mono yourapp.exe
I am developing app, which uses PDFLibNet.dll, everythings works fine on my pc, but when I deploy application and try to use it in another pc, creating PDFWrapper class (from PFDLibNet.dll) throw me an exception:
Could not load file or assembly "PDFLibNet.dll" or one of its dependencies.The specified module could not be found.
The same scenario on Win7 and XP
PDFLibNet.dll is stored in the same directory as binary .exe file of my app.
Any suggestion how to fix it?
I am using .Net4.0, Win7
Thanks!
It can be 2 possible reasons:
1. Check if dll was build for x86 or x64 or AnyCPU if you target machine x64 build your dll x64
2. It can be because of MS C++ redistrubute updates! uninstall them and try to start app again. Or you can either install the redistributable on the target machine.
Actually i have a window service which calls a console application every 5 seconds, for this i have created a folder in D drive and the release files of console application are copy/pasted there but whenever i make any changes in code and copy/paste the latest dlls from the bin/release folder latest code is not getting executed.
I guess you have installed (knowingly or indirectly via VS) the assemblies in the GAC (Global assembly cache). The GAC has priority over local files.
See here for more information.