gpt4 book ai didi

asp.net - asp.net dll 的默认探测顺序是什么

转载 作者:行者123 更新时间:2023-12-04 06:59:46 24 4
gpt4 key购买 nike

asp.net 应用程序中引用的 dll 的探测顺序是什么?是 GAC 然后是本地 bin 吗?

抱歉没有在这台机器上安装 VS 来测试它 - 希望有人从经验中知道

最佳答案

根据 MSDN ,在 GAC 之后,它看起来在这里:

  • Application base, which is the root location where the application is being executed.
  • Culture, which is the culture attribute of the assembly being referenced.
  • Name, which is the name of the referenced assembly.
  • Private binpath, which is the user-defined list of subdirectories under the root location. This location can be specified in the application configuration file and in managed code using the AppendPrivatePath property for an application domain. When specified in managed code, the managed code privatePath is probed first, followed by the path specified in the application configuration file.


正如您将在 MSDN 链接中看到的,它还取决于程序集的加载方式。

如果运行时隐式加载程序集,则这些规则适用。但是,例如,如果您正在调用 Assembly.LoadFrom,则规则会发生一些变化。

关于asp.net - asp.net dll 的默认探测顺序是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2063333/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com