I am using Nmodbus to setup an implementation, and everytime I try to run one of the instances in the code I am prompted with the following error
unable to load DLL 'FTD2XX.dll': The specified module could not be found
I have searched through my system32 folder and copied and pasted a copy of the above DLL in there, and it is also in the folders corresponding to the C# solution. I can see it, it is there, but why am I being prompted with this error?
Aren't you mixing 32bit code with 64bit? Try changing target from AnyCPU to 32bits.
Related
To easily distribute the software to clients, I have to use Ilmerge to combine everything into single exe file, including some dll files e.g. System.Data.SQLite.
When I tried to run the merged exe file, quickly I ran into one issue, it shows the error message "Unable to load DLL System.Data.SQLite.dll. The specified module could not be found." This could be solved by putting this dll file same directory with exe file.
However, this is not an ideal way for me. I had tried to browse my exe file and I am pretty sure that System.Data.SQLite already embed inside. The result I get from google is because System.Data.SQLite is not managed code and cannot be mixed
I have tested csharp-sqlite, but that's look like totally different library for me. Is there any quick way to solve my problem?
I used Inno Setup before and I added System.Data.SQLite.dll as well. Give it try using Inno Setup and see if you will run into the same problem.
I'm writing a WebService that references another managed DLL which then uses a third-party DLL. When I start debugging my WebService I get the following error:
Could not load file or assembly 'AForge.Video.FFMPEG.DLL' or one of
its dependencies.
As recommended in many other posts, I tried these steps:
Changed from AnyCPU to x86
Copied all DLLs to %system32% directory
But had no success so far. Any ideas?
Thanks, Matthias
Could not load file or assembly 'AForge.Video.FFMPEG.DLL' or one of its dependencies.
You are either copying the file(s) to the wrong place or not copying the correct files.
Get to the bottom of this by downloading Dependency Walker
You can then drag AForge.Video.FFMPEG.DLL into the application and it will tell you what is missing.
Also, determine the base directory for your application to ensure you are copying the files to the correct folder at runtime. You can do this by writing System.AppDomain.CurrentDomain.BaseDirectory to the console (or add it to your watch)
Also see this
I re-engineered the project structure in VisualStudio to get rid of the dependency to AForder.Video.FFMPEG.DLL. That helped. I found no other solution so far.
After screwing my head several times over with SQLite causing havok on some machines, I stumbled across a 'Managed Only' version of the library. http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/
I got excited and put this into my project folder, so now my project works on everyone's computer, regardless of architecture!
I got so excited in fact, that I decided to try using ILMerge again (since all my dependencies are now managed) instead of having to copy the DLL files as resources and write them to the output folder if it detects their absence.
I compiled the EXE with the following command:
ilmerge.exe /target:winexe /zeroPeKind /out:"Core View.exe" CoreView.exe System.Data.SQLite.dll OpenHardwareMonitorLib.dll
(The zeroPeKind flag is needed because although SQLite is managed, it isn't flagged as such and causes errors on compilation if zeroPeKind isn't present)
Problem now is that, although it starts up fine, I get the following error when trying to do any database operations when the DLL file is not present:
System.DllNotFoundException: Unable to load DLL 'System.Data.SQLite.DLL'
Can I fix this easily?
This is the only fully managed sqlite3 library I know of.
http://code.google.com/p/csharp-sqlite/
I'm getting a System.DllNotFoundException for a .dll which is in the same folder as the executable whenever my application attempts to use a function which exists in the DLL. The weird thing is that it is only occurring on one user's PC; it works fine on my dev PC and it works fine on one non-dev PC that I tried it on. Also, there are other DLLs in the folder which are being found and used correctly. The DLL in question is a native library which is referenced by my application via another DLL which is a c# wrapper for the native library.
My initial instinct is that there must be some other library being referenced by this DLL which doesn't exist on the problematic PC, but I cannot imagine what library this PC could be missing that the other non-dev PC has.
So my questions are this: is there a way to determine the dependencies of a given DLL file? Keep in mind that the DLL in question is a native library (i.e. not managed code), and I do not have access to it's source code. And if it turns out no dependency is missing, what else might cause such an issue?
For unmanaged dlls you can use Dependency Walker to find dependencies.
I would suggest using ILSpy to open the dll and view its dependencies first.
I am writing a small AOL IM application in C#. I have all the dlls that I need and I have been able to compile and run my app. However, when it runs I get an error that says
"Unable to load DLL 'acccore.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
I understand that this means the acccore.dll file couldn't be found but I don't know why. I tried putting it in C:\Windows\System32 and it is also in the debug directory that is created when the project is build in Visual Studio. Can anyone tell me how to make my application know where this dll is located?
Thanks!
I did some research and it looks like acccore.dll is a COM DLL file. That means you need to run:
regsvr32.exe C:\Windows\System32\acccore.dll
This will register the COM DLL into the registry, you can then use that DLL in your .NET code. Check out the link:
http://64.12.130.129/forum?c=showthread&ThreadID=1173
So you will need to use P/Invoke to use the DLL (I guess the AOL SDK has some example code you can use).
is this dll an assembly?
If so then fuslogvw will show you where the CLR is looking for assemblies. Put it where .net is looking
.NET assemblies need to be in the directory of the application (or one of its subdirectories, especially if they represent a localized version of a different assembly), or in the GAC (global assembly cache.) If the DLL isn't in the same directory as the .EXE, then that's your problem. If it is and it still doesn't work, it means that the assembly doesn't match for some reason.
I used dependancywalker to find the dll I was missing that caused it to error. This was suggested by Taylor Leese in a comment.