what is the default probing order for asp.net dlls
What is the probing order for reference开发者_Go百科d dll's in asp.net apps? Is it GAC then local bin?
Sorry don't have VS installed at this machine to test it out - Hoping someone knows from experience
According to MSDN, after the GAC, it looks here:
- 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.
As you'll see from the MSDN link(s) it also depends on how the assembly is loaded.
These rules apply if the runtime is implicitly loading the assembly. If, however, you're calling Assembly.LoadFrom for example, the rules change a little bit.
Basically, yes. The GAC is searched first. You can read about how the probing is done here.
精彩评论