Is there any way to force my asp.net application to load the assembly from local bin directory since there is another older version of the assembly with the same name in the gac?
I can't delete the gac version since other applications are using it and I am facing some difficulties when adding the newer version to the gac.
Based on the excerpted notes on assembly loading order in this answer: How to prevent a .NET application from loading/referencing an assembly from the GAC?
I am guessing that calling LoadLibrary on the local DLL file before asking the library to load as an assembly, might move it up in the search order for you.
Sadly, I am not sure how to get your LoadLibrary call to run before the framework starts loading referenced assemblies.
So this is just an idea, not a full answer.
To redirect one version to another, use the <bindingRedirect> element. The oldVersion attribute can specify either a single version, or a range of versions. For example, specifies that the runtime should use version 2.0.0.0 instead of the assembly versions between 1.1.0.0 and 1.2.0.0.
s