System.DLLNotFoundException when the DLL exists

Bender the Greatest picture Bender the Greatest · May 2, 2011 · Viewed 8.7k times · Source

I am getting the following error when we load up a DLL in our program that throws the following error:

Unable to load DLL 'xxx.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)

This doesn't make sense to me because the DLL exists and is built into our installer every time we make a change to our code. This DLL has not changed in months and this just started happening about a week ago from our newly installed copies. Any ideas? The project in question is an unmanaged C++ project that gets called from a .NET 3.5 app.

Answer

Andy Finkenstadt picture Andy Finkenstadt · May 2, 2011

Probably one of xxx.dll's dependencies is not being found. You can inspect its dependencies using DUMPBIN /dependents xxx.dll, and intuit some additional information by using Dependency Walker to see which ones might not be present or unfindable on the system under test.