Free mag vol1 | Page 590

CHAPTER 14  BUILDING AND CONFIGURING CLASS LIBRARIES  Note Deciding whether a code library should be deployed as a private or shared library is yet another design issue to contend with, and this will be based on many project-specific details. As a rule of thumb, when you are building libraries that need to be used by a wide variety of applications, shared assemblies can be quite helpful in that they can be updated to new versions very easily (as you will see). The Global Assembly Cache As suggested in the previous paragraph, a shared assembly is not deployed within the same directory as the application that uses it. Rather, shared assemblies are installed into the Global Assembly Cache (GAC). However, the exact location of the GAC will depend on which versions of the .NET platform you installed on the target computer. Machines that have not installed .NET 4.0 or higher will find the GAC is located in a subdirectory of your Windows directory named Assembly (e.g., C:\Windows\assembly). These days, we might consider this the “historical GAC,” as it can only contain .NET libraries compiled on versions 1.0, 2.0, 3.0, or 3.5. See Figure 14-13. Figure 14-13. The “historical” global assembly cache (GAC) 532