I'm trying to build a VS 2005 website project which depends on several managed C++ assemblies. One of the managed C++ assemblies depends (static-load) on an unmanaged DLL which uses __declspec(dllexport) to export classes.
For some reason, I get the following build error:
Error 4 The specified module could not be found. (Exception from HRESULT: 0x8007007E)
(From build output details):
(0): Build (web): The specified module could not be found. (Exception from HRESULT: 0x8007007E)
when I build with the unmanaged DLL in the website's \Bin\ directory, but not in the path. If I put the unmanaged DLL in the path, then re-start visual studio, it builds and runs just fine.
Note: This thread seemed related, but I haven't gotten as far as deployment yet: Unmanaged DLLs fail to load on ASP.NET server
Is there any way to get this .sln building correctly with unmanaged DLL's in \Bin\ rather than the path? (I'd really prefer to keep these as part of the website, not the system)
Edit: It seems I've misunderstood the purpose of the \Bin\ folder to some degree. Sounds like nothing except managed assemblies should go there. (So COM objects and other unmanaged DLLs they rely on which I've been placing there probably belong someplace else.)