订单的组件被装组件、订单

2023-09-03 05:11:58 作者:Smile、凉城

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

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

程序文件夹 C:\ WINDOWS C:\ WINDOWS \ SYSTEM32 广汽

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

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.

此外,这个帖子 microsoft.public.dotnet.framework.aspnet 组包含了非常有用的信息。

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