Working with Assemblies and the Global Assembly Cache - .NET Framework (2024)

Table of Contents
In this article In This Section
  • Article

Note

This article is specific to .NET Framework. It doesn't apply to newer implementations of .NET, including .NET 6 and later versions.

If you intend to share an assembly among several applications, you can install it into the global assembly cache. Each computer where the common language runtime is installed has this machine-wide code cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. An assembly must have a strong name to be installed in the global assembly cache.

Note

Assemblies placed in the global assembly cache must have the same assembly name and file name (not including the file name extension). For example, an assembly with the assembly name of myAssembly must have a file name of either myAssembly.exe or myAssembly.dll.

You should share assemblies by installing them into the global assembly cache only when necessary. As a general guideline, keep assembly dependencies private and locate assemblies in the application directory unless sharing an assembly is explicitly required. In addition, you do not have to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.

There are several reasons why you might want to install an assembly into the global assembly cache:

  • Shared location.

    Assemblies that should be used by applications can be put in the global assembly cache. For example, if all applications should use an assembly located in the global assembly cache, a version policy statement can be added to the Machine.config file that redirects references to the assembly.

  • File security.

    Administrators often protect the systemroot directory using an Access Control List (ACL) to control write and execute access. Because the global assembly cache is installed in the systemroot directory, it inherits that directory's ACL. It is recommended that only users with Administrator privileges be allowed to delete files from the global assembly cache.

  • Side-by-side versioning.

    Multiple copies of assemblies with the same name but different version information can be maintained in the global assembly cache.

  • Additional search location.

    The common language runtime checks the global assembly cache for an assembly that matches the assembly request before probing or using the codebase information in a configuration file.

Note that there are scenarios where you explicitly do not want to install an assembly into the global assembly cache. If you place one of the assemblies that make up an application into the global assembly cache, you can no longer replicate or install the application by using XCOPY to copy the application directory. In this case, you must also move the assembly into the global assembly cache.

In This Section

How to: Install an Assembly into the Global Assembly CacheDescribes the ways to install an assembly into the global assembly cache.

How to: View the Contents of the Global Assembly CacheExplains how to use the Gacutil.exe (Global Assembly Cache Tool) to view the contents of the global assembly cache.

How to: Remove an Assembly from the Global Assembly CacheExplains how to use the Gacutil.exe (Global Assembly Cache Tool) to remove an assembly from the global assembly cache.

Using Serviced Components with the Global Assembly CacheExplains why serviced components (managed COM+ components) should be placed in the global assembly cache.

Creating AssembliesProvides an overview of creating assemblies.

Global Assembly CacheDescribes the global assembly cache.

How to: View Assembly ContentsExplains how to use the Ildasm.exe (IL Disassembler) to view common intermediate language (CIL) information in an assembly.

How the Runtime Locates AssembliesDescribes how the common language runtime locates and loads the assemblies that make up your application.

Programming with AssembliesDescribes assemblies, the building blocks of managed applications.

Working with Assemblies and the Global Assembly Cache - .NET Framework (2024)
Top Articles
Binance Founder Changpeng Zhao Apologizes Ahead of Sentencing, 161 Others Send Letters of Support
MetaMask vs. Trust Wallet: 2023 Comparison
Scheelzien, volwassenen - Alrijne Ziekenhuis
Erika Kullberg Wikipedia
Did 9Anime Rebrand
Professor Qwertyson
Caroline Cps.powerschool.com
Strange World Showtimes Near Amc Braintree 10
Raid Guides - Hardstuck
อพาร์ทเมนต์ 2 ห้องนอนในเกาะโคเปนเฮเกน
Nyuonsite
Money blog: Domino's withdraws popular dips; 'we got our dream £30k kitchen for £1,000'
Finger Lakes Ny Craigslist
Slope Tyrones Unblocked Games
Aberration Surface Entrances
Used Sawmill For Sale - Craigslist Near Tennessee
Simpsons Tapped Out Road To Riches
Craigslist In Visalia California
Craigslist Pinellas County Rentals
What Are The Symptoms Of A Bad Solenoid Pack E4od?
Stihl Dealer Albuquerque
Sister Souljah Net Worth
Black Panther 2 Showtimes Near Epic Theatres Of Palm Coast
Hwy 57 Nursery Michie Tn
Hotel Denizen Mckinney
Att U Verse Outage Map
Dumb Money, la recensione: Paul Dano e quel film biografico sul caso GameStop
Great Clips On Alameda
Dreammarriage.com Login
World History Kazwire
T&Cs | Hollywood Bowl
Bartow Qpublic
Mid America Clinical Labs Appointments
Lovely Nails Prices (2024) – Salon Rates
Karen Wilson Facebook
Nami Op.gg
Www Craigslist Com Atlanta Ga
Exploring the Digital Marketplace: A Guide to Craigslist Miami
Levi Ackerman Tattoo Ideas
Fedex Passport Locations Near Me
Thotsbook Com
Penny Paws San Antonio Photos
Jammiah Broomfield Ig
Bmp 202 Blue Round Pill
Darkglass Electronics The Exponent 500 Test
15 Best Places to Visit in the Northeast During Summer
Greg Steube Height
Jane Powell, MGM musical star of 'Seven Brides for Seven Brothers,' 'Royal Wedding,' dead at 92
Craigslist Psl
Prologistix Ein Number
Convert Celsius to Kelvin
The Missile Is Eepy Origin
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6160

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.