1

I am receiving this exception in my C# project:

System.IO.FileNotFoundException: Could not load file or assembly 'wcl.dll' or one of its dependencies. The specified module could not be found.

wcl.dll is present, so I can only think that the exception is caused by one of its dependencies, which must be missing.

Is there any way to tell what file could not be found?

Edit

I don't have access to the source code or anything from wcl.dll - it's a third-party library.

Another edit

This exception only shows up when I run the application on a clean VM (Win 7, 64 bit), but not on other devices such as my own development PC (also Win 7, 64 bit)

Edited again to change to the actual dll file name!

Update

Hmm... So I found out the two missing dlls by using dumpbin /dependencies. The exception goes away if I include msvcp110.dll and msvcr110.dll copy these into the running directory of the application. However, if I copy them into C:\Windows\System32 it doesn't!

But this problem is only on the Virtual Machine - on any other computer, it suffices to have them in C:\Windows\System32. I have read that these are part of Visual C++ Redistributable - do I have to make that a prerequisite of my project? (Though not sure if that will help with my VM problem)

komodosp
  • 3,316
  • 2
  • 30
  • 59
  • Does blah.dll by any chance has referenced Embedded Assemblies? If yes, you have to load the embedded assemblies into your appdomain in order to use that dll – Tobias Theel Jan 10 '18 at 09:48
  • 2
    The way to tell is by enabling fusion logging. https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net – Alex Paven Jan 10 '18 at 09:50
  • Is your framework aligned with the framework of blah.dll? – Dieter B Jan 10 '18 at 09:52
  • Are `blah` dependencies referenced well ? you should know about all `blah` dependencies and add them also. – Aria Jan 10 '18 at 09:57
  • 1
    as a hint: [how-to-check-for-dll-dependency](https://stackoverflow.com/questions/7378959/how-to-check-for-dll-dependency) – Craylen Jan 10 '18 at 10:38
  • @Ryfang - thanks for that, `dumpbin` - suggested in that link - did help in that it revealed two missing dlls from C:\Windows\System32 - I copied them to the offending machine, but I'm still getting the same exception. – komodosp Jan 10 '18 at 11:54

0 Answers0