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
7 Reasons Why Software Testing Has a Bright Future
Working with List and Key Prop in React - Scaler Topics
Netronline Taxes
Lifewitceee
Missed Connections Inland Empire
How Many Cc's Is A 96 Cubic Inch Engine
Missing 2023 Showtimes Near Cinemark West Springfield 15 And Xd
Voorraad - Foodtrailers
Ingles Weekly Ad Lilburn Ga
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Jefferson County Ky Pva
Vocabulario A Level 2 Pp 36 40 Answers Key
Tiraj Bòlèt Florida Soir
Lantana Blocc Compton Crips
Delectable Birthday Dyes
The Shoppes At Zion Directory
Byte Delta Dental
Images of CGC-graded Comic Books Now Available Using the CGC Certification Verification Tool
Salem Oregon Costco Gas Prices
Ess.compass Associate Login
Where to Find Scavs in Customs in Escape from Tarkov
Walgreens Tanque Verde And Catalina Hwy
Arre St Wv Srj
Metro Pcs.near Me
Roanoke Skipthegames Com
Urbfsdreamgirl
27 Fantastic Things to do in Lynchburg, Virginia - Happy To Be Virginia
Evil Dead Rise Ending Explained
Lininii
King Soopers Cashiers Check
Ilabs Ucsf
What Is The Lineup For Nascar Race Today
Lehpiht Shop
24 slang words teens and Gen Zers are using in 2020, and what they really mean
Newcardapply Com 21961
Exploring TrippleThePotatoes: A Popular Game - Unblocked Hub
Cvb Location Code Lookup
Laurin Funeral Home | Buried In Work
Dr. John Mathews Jr., MD – Fairfax, VA | Internal Medicine on Doximity
Sc Pick 4 Evening Archives
Mvnt Merchant Services
Daily Times-Advocate from Escondido, California
Scarlet Maiden F95Zone
What Is A K 56 Pink Pill?
Senior Houses For Sale Near Me
Breaking down the Stafford trade
Www Pig11 Net
Is Chanel West Coast Pregnant Due Date
Mytmoclaim Tracking
Craigslist Anc Ak
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.