Articles → .NET → Adding Assembly in GAC

Adding Assembly in GAC

Picture showing code for 'Addition' function

Click to Enlarge

•  Go to command prompt

•  Go to the directory where the dll file is placed .In this case the path is d:\GacLibrary\GacLibrary\Bin\debug as shown in fig below

Picture showing the compiled DLL

Click to Enlarge

•  Write the following command on the command prompt

sn -k GACLibrary.snk

Picture showing the command to create strong key in command prompt

Click to Enlarge

•  Right click on the project in the solution explorer and click properties

Picture showing the 'Properties' window when right-click in solution explorer

Click to Enlarge

•  Go to the signing options and give the path of file GACLibrary.snk as shown in figure below

Picture showing applying strong key to DLL

Click to Enlarge

Adding assembly to GAC

gacutil  /i GACLibrary.dll

Picture showing 'gacutil' command for adding DLL in GAC

Click to Enlarge

Posted By  -  Karan Gupta
Posted On  -  Sunday, December 20, 2009


Your Email Id  
Query/FeedbackCharacters remaining 250