Search code examples
c#gac

Prevent loading a dll from GAC


I have an Aspx page with no .cs file. This page is using a dll file which is already in the GAC of my machine. I have a new version of this dll, but I don't want to change anything in the GAC. Can I make this aspx page load the dll from my bin directory and override the GAC?


Solution

  • Yes. Just put new assembly to folder where your application binaries are and use assembly redirection Assembly Redirection

    And make sure your assembly version has changed.