.NET deployment: which type of assemblies are stored in the Global Assembly Cache (GAC)?

Difficulty: Easy

Correct Answer: Shared Assemblies

Explanation:


Introduction / Context:
In the Microsoft .NET ecosystem, the Global Assembly Cache (GAC) is a machine-wide code cache for assemblies intended to be shared by multiple applications. Understanding what belongs in the GAC helps architects decide versioning, side-by-side execution, and deployment strategies for common libraries across the system.


Given Data / Assumptions:

  • The GAC is located at a system path and requires strong-named assemblies.
  • Private assemblies live alongside an application and are not shared globally.
  • Terminology like “friend” or “protected” assemblies is not standard in .NET deployment.


Concept / Approach:

Assemblies placed in the GAC are shared assemblies—they are intended for reuse across multiple applications on the same machine. They are typically strong-named (signed) to support versioning and identity. Private assemblies are deployed in an application’s bin folder and are isolated per app. The other labels in the options do not correspond to recognized GAC categories.


Step-by-Step Solution:

Identify the purpose of the GAC: hosting shared, strong-named assemblies. Map options: only “Shared Assemblies” aligns with that purpose. Eliminate distractors: “Private,” “Friend,” “Public,” “Protected” are not GAC categories. Choose “Shared Assemblies.”


Verification / Alternative check:

Use gacutil or PowerShell to list GAC contents; you will see strong-named libraries referenced by multiple apps, confirming they are shared components.


Why Other Options Are Wrong:

Private Assemblies: app-local deployment; not placed in the GAC.

Friend/Public/Protected Assemblies: not standard .NET deployment classifications.


Common Pitfalls:

  • Putting app-specific assemblies in the GAC unnecessarily, complicating updates.
  • Forgetting that GAC requires strong names, leading to deployment errors.


Final Answer:

Shared Assemblies

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion