Here I will explain if we have two version of same assembly in GAC how we make a choice.
In interviews it’s common Question for everyone. Let’s say you have made an application and its using a DLL which is present in GAC. Now for some reason you make second version of the same DLL and put it in GAC. Now which DLL does the application refer? Ok by default it always uses the version by which you have compiled you application in IDE. But you want that it should actually use the older version.
In that situation you need to specify “bindingRedirect” in your config file. For instance in the below case “ClassLibraryVersion” has two versions “1.1.1830.10493” and “1.0.1830.10461” from which “1.1.1830.10493” is the recent version. But using the bindingRedirect we can specify saying “1.0.1830.10461” is the new version. So the client will not use “1.1.1830.10493”.
<bindingRedirect oldVersion= "1.1.1830.10493"