locked
Assemblies in the GAC RRS feed

  • Question

  • User-1136635841 posted

    Hello

    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 ?

    Thursday, April 17, 2008 8:52 AM

Answers

  • User-125547262 posted

    Is the framework "smart" enough to retrieve the assemblies in the Bin when it can't find them in the GAC   --Yes

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 17, 2008 10:10 AM

All replies

  • User-125547262 posted

    Is the framework "smart" enough to retrieve the assemblies in the Bin when it can't find them in the GAC   --Yes

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, April 17, 2008 10:10 AM
  • User1929129735 posted

     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?

    Thursday, April 17, 2008 4:24 PM
  • User-762694769 posted

    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.

    Thursday, April 17, 2008 4:28 PM