Interview Questions On Assemblies In .NET
Q: What is GAC (Global Assembly Cache)?
A: GAC
is a central repository folder where you can store and share your DLL among different
applications running in the same computer. So for example you have accounting
and invoicing application running in the same computer and both these
application need some common utility like the logging DLL then you need to
register them in GAC and share with them this dll from one common location instead of referencing the logging dll from logging project bin directory.
Q: If
we have different versions of DLL in GAC how can the application identify them?
A: This
is done by using binding redirect and specifying older version and new version
value. So which ever version you put in the new version will be used by the
application.