Search code examples
c#dllnotfoundexception

C# System.DllNotFoundException


I have a simple application using a product activation system offered by cryptlex (cryptlex.com).

The program works correctly on my computer, but when I try to run the program on another machine it returns this error:

Picture: Error

I've already made sure that the dll is inside the executable folder and everything looks OK.

When I remove all part of cryptlex the program works perfectly on any machine (x86-x64)

I used depencywalker to check for errors and found these two in the executable that uses cryptlex:

Error

Windows 7 64bits, .NET Version: 4.0


Solution

  • You can use Process Monitor to record all file activities of the program. Set a filter for your executable. After reproducing the error, save the log as XML file.

    Then run ProcMon Analyzer (note: I'm the author of it). It will analyze the file and give a list of DLLs that were not found.

    You could also do that manually, but note that some DLLs may not be found at first, but later be found when looking in the %PATH% environment variable etc. The tool will remove all those entries which have PATH NOT FOUND first but SUCCESS later.