views:

86

answers:

2

I have an asp.net application, with a number of referenced dll's.
Now it seems when compiling the project I keep getting this one error:

   The specified module could not be found. Exception from HRESULT: 0x8007007E

I See that one of the dll's that get referenced is the interop.dll, I suspect this error comes from the fact that interop.dll needs some native resource that's not registered on the system.(Do correct me if i'm wrong please)

Is there anyway I can find out what that resource (exe, dll, activex,..) is?

+1  A: 

Google gave me interesting result: http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/6793785a-ec98-4453-a62b-f1a85195ec05

Basically, it says that you can use Dependency Walker to check which dlls you need.

I really recommend searching some more on google. There are lots of web pages that discuss similar problem.

empi
A: 

You can use .Net Reflector (from Redgate Software, formerly Lutz Roeder's Reflector) to track down dependency issues. It's not automatic, but it's worked for me in the past.

  1. Open your application's dll or exe, which you think references a missing dependency, in Reflector. You'll probably want to start with the interop.dll you mentioned.
  2. Right-click the dll in Reflector and select Disassemble.
  3. Click on each of the types, one by one, and look for ComImport and TypeLibType attributes, which specify the GUID of any external COM types being referenced.
  4. Open regedit, and search HKEY_CLASSES_ROOT for the GUID. You should be able to come across an Interface that matches the GUID, with a TypeLib sub-key that contains another GUID.
  5. Now search HKEY_CLASSES_ROOT using the TypeLib GUID. You should find a match with a InProcServer32 subkey that contains the path to the COM dll or exe.

If you don't find any matches, then something is missing somewhere. Just browsing through Reflector may give you some clues that can help you track down what is missing.

Or, if you do find matches, you might be clued into an SDK that wasn't properly installed, or that may have other companion DLLs that may need to be manually registered (using regsvr32).

Hope this helps (and makes sense).

CodeToaster