Installing Shared Assembly in C#
In this article we will discuss about how to install the assemly in GAC to make it shared in C#.
To install a shared assembly in the Global Cache we would have to use the Global Assembly Cache utility tool called gacutil along with /i option. Here /i stands for install. This is what we must type at the command prompt to install the assembly.
If the assembly is successfully installed, the following message would appear:
Assembly successfully added to the cache
To install the the shared assembly in order to make it shared we will write the following command in the command prompt.
The steps are as follows:
- Open the Visual Studio 2010.
- Then go to Visual Studio Tools.
- Then go to Visual Studio Command Prompt(2010).
- A Command prompt will open and write the following command to install the assembly in GAC.
Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer and if we want to uninstall the assembly from GAC then we have to write the following command:
D:>gacutil -u path of dll;
Then it will uninstall the assembly from GAC.Further Readings
You may also want to read these related articles.
Got a programming related question? You may want to post your question here
Programming Answers here