标签云

微信群

扫码加入我们

WeChat QR Code

I know that the .NET framework looks for referenced DLLs in several locations

  • Global assembly cache (GAC)
  • Any private paths added to the AppDomain
  • The current directory of the executing assembly

What order are those locations searched? Is the search for a DLL ceased if a match is found or does it continue through all locations (and if so, how are conflicts resolved)?

Also, please confirm or deny those locations and provide any other locations I have failed to mention.


I am not having any real assembly loading problems. I am trying to understand the search/load order from an academic perspective.

2018年08月14日49分57秒

And you're right about '%path%'... I had mistaken this from some work with p/invoke calls (I used '%path%' to simplify the 'DllImportAttribute' use).

2018年08月14日49分57秒

If a .net dll references a native dll the paths could be used

2018年08月14日49分57秒

article does not exist anymore, so we have no idea what the rest of the list is based on your answer

2018年08月14日49分57秒

All links are OK on my end.

2018年08月14日49分57秒

This seems to be dependant on loading a regular Dll not a .net assembly.

2018年08月15日49分57秒