---
title: "What is GAC? What are the steps to create an assembly and add it to the GAC?"  
description: "What is GAC? What are the steps to create an assembly and add it to the GAC?"  
author: "Pushpendra Singh"  
published: 2010-10-25  
updated: 2020-09-24  
canonical: https://www.mindstick.com/interview/156/what-is-gac-what-are-the-steps-to-create-an-assembly-and-add-it-to-the-gac  
category: ".net"  
tags: [".net"]  
reading_time: 1 minute  

---

# What is GAC? What are the steps to create an assembly and add it to the GAC?

The global assembly cache (GAC) is a machine-wide code cache that stores assemblies specifically designated to be shared by several applications on the computer. \
**Steps**\
- Create a strong name using sn.exe tool eg: sn -k mykey.snk\
- in AssemblyInfo.cs, add the strong name eg: [assembly: AssemblyKeyFile("mykey.snk")]\
- recompile project, and then install it to GAC in two ways :\
• drag & drop it to assembly folder (C:\WINDOWS\assembly OR C:\WINNT\assembly) (shfusion.dll tool)\
• gacutil -i abc.dll\

## Answers

### Answer by Pushpendra Singh

The global assembly cache (GAC) is a machine-wide code cache that stores assemblies specifically designated to be shared by several applications on the computer. \
**Steps**\
- Create a strong name using sn.exe tool eg: sn -k mykey.snk\
- in AssemblyInfo.cs, add the strong name eg: [assembly: AssemblyKeyFile("mykey.snk")]\
- recompile project, and then install it to GAC in two ways :\
• drag & drop it to assembly folder (C:\WINDOWS\assembly OR C:\WINNT\assembly) (shfusion.dll tool)\
• gacutil -i abc.dll\


---

Original Source: https://www.mindstick.com/interview/156/what-is-gac-what-are-the-steps-to-create-an-assembly-and-add-it-to-the-gac

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
