FileNotFoundException when loading dll

When I try to execute my program, I get a FileNotFoundException, howerver dll exists in the same folder. How is this possible and how to solve the problem? The result below is translated from the localized messages of the 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 executables work on my Windows 7 machine (but don't work on another Windows Server 2008 R2 machine).

+1
source share
3 answers

Please check out Debugging build failures crash .

Most likely, the reason is that some linked file is not installed in the GAC on the server servers or the x86 / x64 mismatch.

+2
source

Perhaps QuickFASTDotNet.dll calls some functions of another library, and this library was not found. You can use dllexp to test it.

0
source

I was getting the same error when the file was locked by Windows because it was copied from another computer. Right-click on the dll file and click on the "Unlock" button on the security tab

See https://superuser.com/questions/38476/this-file-came-from-another-computer-how-can-i-unblock-all-the-files-in-a

0
source

Source: https://habr.com/ru/post/1399097/


All Articles