【发布时间】:2011-11-12 14:41:13
【问题描述】:
我有一个使用几个 .Net dll 的 .Net 应用程序,这些 dll 位于 PATH 环境变量中包含的文件夹中,但是当我启动 .Net 应用程序时如果失败并出现错误:
Could not load file or assembly 'FxDoc.dll, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d4261664821' or one of its dependencies. The system cannot find the file specified.
我已经阅读了这些 MSDN 条目 Search Path Used by Windows to Locate a DLL 和 Dynamic-Link Library Search Order
其中规定:
Windows 然后按以下顺序搜索 DLL:
当前进程的可执行模块所在目录 位于。
当前目录。
Windows 系统目录。 GetSystemDirectory 函数 检索此目录的路径。
Windows 目录。 GetWindowsDirectory 函数检索 该目录的路径。
PATH 环境变量中列出的目录。
我的问题是:
- 哪些因素可能导致此错误?
- 以上信息对.Net有效吗?
【问题讨论】:
-
这有一个强名称吗?问题是否有可能是由于 FxDoc.dll 所依赖的不同 DLL 造成的?
-
@Arun dll 没有任何字符串名称,系统中只存在一份副本(100% 确定)。