[转]The specified module could not be found. (Exception from HRESULT: 0x8007007E)

问题:
I have a managed C++ project (MyLib) that is utilizing 3'rd party C++ code and libraries. When I have set a reference to that project (MyLib) I have seen this error. When I put the 3'rd party .dll's into the current directory the error goes away and all works as expected however the Web projects still throw this error when attempting to compile. Is there something I need to do differently for the Web project?


Here is an example of what I am trying to do ...

- I have a managed C++ project (MyLib) that uses 3'rd party C++ code and unmanaged .dll's
- I have written a C# code library that uses MyLib
- When using a console application that references the C# library I receive this error until I put the unmanaged 3'rd party .dll's into the working directory (bin/debug)
- When attempting to compile a C# Web project that references the C# library I continue to get this error even after placing the 3'rd party unmanaged .dll's into the working directory (bin/debug)

Any help that you may be able to provide would be very helpful. Thanks in advance.

一解答:
If it doesn't have the full path to the DLL, Windows searches for unmanaged DLLs in this order:
1. app's startup directory
2. app's current directory
3. c:\windows\system32
4. c:\windows\system
5. c:\windows
6. path environment variable

Options 1 and 2 are not useful in the case of a web app, it runs through IIS.  Visit forums.asp.net or an IIS newsgroup at www.microsoft.com/communities for alternate deployment strategies for IIS.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值