---
title: "Difference between Private and Shared Assembly in C#"  
description: "In this article, we'll learn about what is Private or Shared Assembly and steps to create."  
author: "Anonymous User"  
published: 2021-07-05  
updated: 2021-07-05  
canonical: https://www.mindstick.com/articles/327209/difference-between-private-and-shared-assembly-in-c-sharp  
category: "c#"  
tags: ["visual studio"]  
reading_time: 1 minute  

---

# Difference between Private and Shared Assembly in C#

**Private Assembly :** When we build an assembly which can be only used by particular Application, then that assembly will be called [as Private](https://answers.mindstick.com/qa/31863/can-we-declare-the-main-method-of-our-class-as-private) Assembly. Private Assembly create the separate copy of assembly with each user application.

Steps : 1.) Create dll file

2.) Create a [Console Application](https://answers.mindstick.com/qa/49661/how-to-create-a-small-game-program-in-c-sharp-console-application)

3.) Adding [reference](https://answers.mindstick.com/qa/82445/what-are-reference-types-in-c-sharp) of .dll file to console application and call it.

To know it with more [knowledge](https://yourviews.mindstick.com/story/4914/6-ancient-indian-universities-that-were-centers-of-knowledge) go to : [Create Private Assembly Application in C sharp](https://www.mindstick.com/articles/327210/create-private-assembly-application-in-c-sharp)

**[Shared](https://www.mindstick.com/forum/155587/what-is-shared-assembly) Assembly :** When we deploy an application which can be used by several apllication, then the Assembly will be [known as](https://answers.mindstick.com/qa/31993/who-is-popularly-known-as-iron-man-of-india) Shared Assembly. These assembly muwt have Strong Key Name(.snk) file in it and these assembly must associated in [Global Assembly](https://www.mindstick.com/forum/155582/what-is-global-assembly-cache-gac-in-dot-net-framework) Cache(GAC).

While use of shared assembly copy assembly does not created with each application rather than each client application has referenced to the same assembly.

Steps :

1.) Create .dll file.

2.) Creating .snk File

3.) Associate dll file with .snk file.

4.) Adding dll to GAC

5.) Create a Console Application

6.) Adding reference of dll to console application

---

Original Source: https://www.mindstick.com/articles/327209/difference-between-private-and-shared-assembly-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
