Working with Assemblies and the GAC

Note

You must have administrator privileges on your computer to complete the examples in this section. Only an administrator can delete files from the GAC.

Often, when you create an assembly, you will want it to be shared by multiple applications. This is not really a problem because multiple applications can point to the same DLL. However, when you set a reference to a DLL inside a project, it records the path to the DLL. What if the path later changes? Or what if you don't know the final path on the eventual production machine?

As you've already read, the Global Assembly Cache, or GAC, allows you to place components into a cache that can be accessed by any application. Therefore, you could take the Healthcare.DLL ...

Get A Programmer's Introduction to Visual Basic® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.