Last post Apr 17, 2008 04:28 PM by hongping
Apr 17, 2008 08:52 AM|annalady|LINK
When third parties assemblies are added to a WebSite (for example AjaxControlToolkit assemblies or Crystal Reports assemblies), these assemblies are referenced in the Web.config file in
system.web / compilation / assemblies, and when I check the
References tab in the Property Pages of my WebSite, I can see than these assemblies are in the GAC :
However when I publish my solution to the Webserver, I have to manually add those dll files to the
Bin folder of my project.
My question is : how does the framework know that it must retrieve the assemblies from the GAC or from the Bin folder ?
Here the assemblies are supposed to be in the GAC, but when the Website is deployed, the assemblies are in the Bin folder, and the Website still works even if the dll are in the Bin folder and not in the GAC. Is the framework "smart" enough to retrieve the
assemblies in the Bin when it can't find them in the GAC ?
Apr 17, 2008 10:10 AM|Jeev|LINK
Is the framework "smart" enough to retrieve the assemblies in the Bin when it can't find them in the GAC --Yes
Apr 17, 2008 04:24 PM|daveh551|LINK
follow up question - if it finds them in both (GAC and bin folder), which one does it take, and, assuming they are different versions, how does versioning play into it?
Apr 17, 2008 04:28 PM|hongping|LINK
Only the first assembly matching the version and strong name will be used, and I think the GAC is always searched first. You could use fuslogvw.exe to check where assemblies are searched for.
You can use binding redirect if you want to load another version of the assembly instead of the specified version.