I have a VS2008 solution with three projects: C# ASP.NET web service, which is using C++/CLI DLL, which in turn is calling functions of native C++ DLL. All references are properly set. In web service bin folder there are all three DLL's. Problem is when I hit F5 the page in my browser informs me about FileNotFoundException
from HRESULT 0x8007007E, The specified module could not be found.
The missing module is my native DLL. ASP.NET Development Server copies (and uses) my C++/CLI DLL somewhere in %USERPROFILE%\AppData\Local\Temp\Temporary ASP.NET Files\root
, but not the native one. If I manually copy native DLL to the same folder with C++/CLI DLL then I can debug my web service. However, this copying does not seem right.
Copying native DLL somewhere on PATH does not feel right either, because other developers need to remember it.
There is a similar question here, and a blog post linked in one answer. The given solution requires that I change DLL's to be delay-loaded, which again seems to much of a half-baked workaround, because it requires to change the end product due to development hurdles.
Is there a proper way to debug a combination of web service, C++CLI DLL, and native DLL?
The issue is simply that the compiler can't figure out where the native c++ library is.
So, there are a couple ways to fix that.
path
environment variable to it's location.http://blogs.msdn.com/b/jorman/archive/2007/08/31/loading-c-assemblies-in-asp-net.aspx
There's no real answer beyond those.