When I try to execute my program I receive FileNotFoundException, howerver dll exist in the same folder. How is that possible and how to fix the problem? Output below translated from localized messages of Russian Windows Server 2008 R2 Foundation:
C:\Oleg\bin\fast>FAST.exe
Exception: System.IO.FileNotFoundException: Can't load "QuickFASTDotNet.dll"
or dependent component. Can't find this file.
in FAST.FAST..ctor()
in FAST.Program.Main(String[] args) in C:\Oleg\fast\FAST\FAST\
Program.cs:line 474
C:\Oleg\bin\fast>dir QuickFASTDotNet.dll
16.02.2012 16:45 117 760 QuickFASTDotNet.dll
The same binaries work on my Windows 7 machine (but doesn't work on another Windows Server 2008 R2 Foundation machine).
Please check out Debugging Assembly Loading Failures.
Most likely reason is some related file is not installed in the GAC on you Server machines, or x86/x64 mismatch.
Perhaps, QuickFASTDotNet.dll call some function of another library and these library not found. You can use dllexp to check it.
I was getting same error when the file has been blocked by Windows since it's been copied from another computer. Right click on the dll file and click on "Unblock" button from the security tab
See https://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a
Related
Trying to connect mainframe using console app provided here, getting below error in the trace.
SSL DLL init failed: Cannot load ssleay32.dll
Tried copying ssleay32.dll in bin folder but still getting the issue.
Please help me with this.
I am using a windows machine
Assuming your operating environment is Linux. Make sure the LD_LIBRARY_PATH includes the location of the dll you are loading.
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:x3270ifInstallDir/bin
Replacing x3270ifInstallDir/bin with where your dll is located
I'm working with National Instruments Measurement Studio in C#, and I've come across a bit of a problem in deploying my application to a particular computer (running Windows 7). I've tried asking on the National Instruments forums, but haven't got any solutions yet - could anyone here give me some tips?
Essentially, I have deployed this application several times on a number of computers, but in this particular case I receive an error when running the program -
"System.DllNotFoundException: Unable to load DLL 'nianlys.dll': The specified module could not be found. (Exception from HRESULT: 0x80070007E)
I have ensured that nianlys.dll is present in C:\Program Files
(x86)\National Instruments\Shared\Analysis.
I have ensured that libiomp5md.dll and LV110000_BLASLAPACK.dll, the files from mkl.msm (nianlys.dll has a dependency on mkl.msm), are present. nianlys.dll also has a dependency on nimetautils.msm, but I'm not sure which dlls are included in this.
I have ensured the program is installed by running the setup.exe as an administrator (as opposed to running the .msi that is generated, see here).
I have ensured the computer in question is up to date with updates to the .net framework via windows update.
I have tried reinstalling the program several times, sometimes with a freshly-recompiled installer.
I have tried adding in the 64 bit nianlys.msm into the setup project manually - this throws an error because the TargetPlatform property of the setup project is set to x86. The 32 bit version is, of course, already present in the detected dependencies.
Interestingly, taking a copy of nianlys.dll from C:\Program Files (x86)\National Instruments\Shared\Analysis and inserting it into the directory the program is installed in throws up a different error - in this case, the error is:
"An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"
Taking a copy of the 64 bit version of nianlys.dll from another computer (default location C:\Program Files\National Instruments\Shared\Analysis) and inserting it into the directory the program is installed in throws up a third type of error - "System.DllNotFoundException: Unable to load DLL 'nianlys.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)". It should be noted that this .dll was present before installing the program on the machines that the program works on, but is not present on the target computer that is throwing up problems.
Taking the same 64 bit nianlys.dll and inserting it into the location it was found on on another computer, C:\Program Files\National Instruments\Shared\Analysis, does not solve the original error.
Even more interestingly, I have tried to reproduce the error on a computer on which the program works - removing the x64 version of nianlys.dll throws up the original HRESULT: 0x80070007E error, whereas removing the x86 version causes a windows installer to appear when running the program.
On a computer upon which the program works with no problems, the windows task manager does not seem to indicate that the program is 32 bit (with the *32 suffix on the program name), despite the target platform being set to x86. It seems from all this that there is some issue with the nianlys.dll being used in both its x64 and x86 versions, despite the target platform only being x86.
I'm running out of ideas about what kind of thing I could try to solve this problem.
I suspect that even though the setup is for X86, the project itself is AnyCPU and thus runs as a 64bit process on 64bit systems and as a 32bit process on 32bit systems. As you said your DLL is in the Program Files (x86) folder I assume it is 32bit only, so you should compile your application explicitly as x86, too. It is your bullet #7 that leads me to this conclusion.
Just copying the nianlys.dll 64bit DLL doesn't seem to work as it seems to rely on other DLLs it then can't find. (bullet #8).
It may caused by the dependents of nianlys.dll are not found. You can diagnose this problem with the process monitor , one of the system internal tools. It can capture the loading/unloading DLL activities, so if something wrong, you can find it in the log.
Be sure to use the filter when use this tool, otherwise the log file will be huge.
I have a console application which works perfectly in 32 bit machine. But I'm having problem running the executable in 64 bit windows server. The error message I get is:
The type initializer for "Sybase.Data.AseClient1.AseConnection" threw an exception. System.BadImageFormatException. An attempt was made to load a program with incorrect format. at Sybase.Data.AseClient.Unmanaged.AseGetDriverVersion at Sybase.Data.Aseclient1.AseConnection.CheckVersion().
Has anyone seen this error?
Update: After compiling in X86, I get:
Major version mismatch sybdrvado20.dll. Expecting major version '2'. Loaded version 1 at Sybase.Data.AseClient1.AseConnection.CheckVerison.
Please note that the server has latest Sybase version.
Even easier, download the x64 version http://www.sybase.com/detail?id=1051287&elq=00000000000000000000000000000000
I had similar problems, because the driver is 32 bit. so try to build your application for x86. You can do this in your project properties.
Regarding the error "Major version mismatch sybdrvado20.dll...", what solved for me was replacing the old version of sybdrvado20.dll that was in the bin folder of my application (located in the server) for the new one, located in C:\Sybase\DataAccess\ADONET\dll or C:\Sybase\DataAccess64\ADONET\dll.
To check the version of the dll, right-click the file, go to Properties and click in the tab Details.
i just wrote a program that uses microsoft encoders and merge videos and audios , its working fine in my PC (Windows7 ) and when i test it on other PCs (Windows7,Windows XP [.net 4.0 installed]] it is giving me following exception
its even giving me exception when i try to run the sample sdk applications to other pcs ..(with no microsoft expression installed)
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or ass
embly 'Microsoft.Expression.Encoder.Utilities.dll' or one of its dependencies. T
he specified module could not be found.
at Simple.Program.Main(String[] args)
how can i solve this error ,
or what are the ways to deploy standalone application , without pc pre installed microsoft expression studio.
thanks
Microsoft.Expression.Encoder.Utilities.dll is part of Expression Studio. If it isn't installed on the target machine it will not be found.
I don't know if these DLLs can be freely distributed, but you should find out before trying to distribute them with your application.
try to locate this dll-file on your machine, and distribute it with your executable to a pc that hasn't got expression installed.
when a program is about to use a dll, it looks in some predesignated places on the computer. one of the first places is in the folder the executable is executed in. one of the later places is probably c:\windows\system32
you have the filename though, so it shouldn't be that hard. unless microsoft has created some sort of mechanism stopping the distribution of the expression utilities.
I am using a quickbooks sdk that containst the QBFC8Lib dll
everything works fine on my dev machine.
when I publish to my live server I get the following error:
System.BadImageFormatException: Could not load file or assembly 'Interop.QBFC8Lib' or one of its
enter code heredependencies. An attempt was made to load a program with an incorrect format
I have the sdk installed on both my dev machine and the live machine. still getting this error
You areexactly right. on the server I went to the application pool for this application and needed to set enable 32 bit applications to true. That did it. Thanks for your help