It is my understanding that .NET runtime will always look for referenced assemblies in GAC first and then in the local folders. Is there a setting in Web.Config that would invert this order?
views:
361answers:
4No. It's not possible to achieve this. If a DLL of equal version to the one referenced in your program exists in the GAC the CLR will always choose this one. There is no way to override this behavior.
I'm not sure if there's something that will actually reverse the search order as such, but depending on your requirements you might want to look into assembly binding redirection which gives you quite a lot of control over which versions of assemblies are loaded.
JaredPar is right - the GAC will always get polled first for the assembly. However, if you're like me, and want to have the DLL live in the GAC and still debug, you can add a build script to dump your .pdb file the same folder as the assembly in the GAC (it'll be in C:\windows\assembly\gac_msil\assembly.name_[public key token]).