GAC (Global Assembly Cache) is the .NET provided folder location to contain all the shared assemblies across .NET Framework and applications.
One of the basic and mandate requirement before any assembly could be deployed in the GAC is to Sign the assembly with Strong name.
---------------------------------------------
Steps to deploy an assembly into the GAC
---------------------------------------------
1- Sign the class-Library project generated .dll with Strong name.
Select the Class-Library project--> Right-click--> select Properties, under Signing tab, create a new Strong name key by passing a name you would like to have.
2- It will create a file with the provided name having .snk as file extenion.
it will be saved under the same project folder
3- Now if needed you can create various versions of the same assembly (.dll) by
giving desired version number to the assembly file in the AssemblyInfo.cs
4- When you Build the solution, it will generate the .dll with the provided version number (default is 1.0.0.0) in the application root's bin\debug folder.
5- After each build (ver 1.0.0.0 and 2.0.0.0) to separate folders, as its the same .dll and only version if different and \bin\debug doesn't differentiate between two versions.
6- Drag-drop the MathLibrary 1.0 and 2.0 into the GAC.
Sunday, April 11, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment