Question

While the interview , I was confused after interviewer asked this question about Global Assembly Cache (GAC). What should be the answer?

Question 1: Instead of keeping the assembly in GAC, If we create the directory and keep our assemblies there and if we make that directory as shared so can the connected computers can use those assemblies? What is the difference if I kept assembly in GAC and in shared folder ?

Edited: Question 2: Consider there is the 4 visual studio enabled development machines. out of those , one is serve as server. so can other machines (other than server machines) use assemblies in the GAC of server machine ?

Was it helpful?

Solution

The assemblies that are hosted in the GAC, are formally called Shared Assemblies or Global Assemblies (please don't confuse with your Shared Assemblies). One advantage of placing an assembly in the GAC is version control, while the assembly is in the GAC, can co-exist with another version of the same assembly, although have the same file name, it is distinguished by the internal signature, which contains a strong name. Please see this link

OTHER TIPS

Assemblies in the GAC run with Full Trust. Assemblies anywhere in any file system fall under some Security Guidelines that may prevent them from functioning. For example, before .net 3.5 SP1, assemblies on a Network share were untrusted and couldn't do stuff like accessing the file system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top