订单的组件被装 [英] The Order of Assemblies Being Loaded

查看:136
本文介绍了订单的组件被装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个.NET程序集,同一版本,文件名相同,但位于不同的位置:

I have a few .Net assemblies, same version, same file name, but located at different location:

  1. 程序文件夹
  2. C:\ WINDOWS
  3. C:\ WINDOWS \ SYSTEM32
  4. 广汽

现在,该位置的组件将首先被加载?

Now, which location's assembly will be loaded first?

推荐答案

.NET程序集都有不同的搜索顺序比普通窗口为.dll。海关总署将被检查只有在程序集强命名签署的第一件事。如果装配不签订GAC /不强名称,本地文件夹后检查。这是.NET程序集搜索顺序的末尾,1,2和3以上未检查。

.Net assemblies has different search order than regular windows .dll. GAC will be checked the first thing ONLY if the assembly is strongly named signed. If the assembly is not in the gac / not strong name signed , the local folder is checked after that. That is the end of the .net assembly search order, 1,2 and 3 above are not checked.

您可以更改的.NET通过具有本地配置文件为您应用程序的外观进行组装。

you can change where the .net looks for assembly by having a local configuration file for you app.

此外,<一个href="http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/5eac976e91a5547a/44ee27d9289841f7?lnk=st&q=assembly%2bsearch&rnum=1"相对=nofollow>这个帖子 microsoft.public.dotnet.framework.aspnet 组包含了非常有用的信息。

Also, this post in the microsoft.public.dotnet.framework.aspnet group contain very useful information.

这篇关于订单的组件被装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆