Search This Blog

Wednesday, July 14, 2010

CREATE GLOBAL ASSEMBLY(GAC)

CREATE GLOBAL ASSEMBLY(GAC)
step 1:
create Assmbly using class library project
step 2:
go to visual studio command prompt -> generate Strong name key
1.add the follwing code ==> sn -k "[DriveLetter]:\[DirectoryToPlaceKey]\[KeyName].snk"
2.example -->sn -k "E:\Example\TestAssm\TestAssm\test.snk"

step 3: open class libray project -> go to->Solution explorer open-> assemblyinfo.cs
Add the code -->[assembly: AssemblyKeyFile("E:\Example\TestAssm\TestAssm\test.snk")]
and then save to build prjoect

step 4: again open the prompt and type the follsing command -->
1.gacutil -I "[DriveLetter]:\[PathToBinDirectoryInVSProject]\gac.dll"
2.gacutil -I "E:\Example\TestAssm\TestAssm\debug\testassm.dll"

step 5:
1.gacutil –I
2.gacutil –I "testassm.dll"
In this command, assembly name is the name of the assembly to install in the global assembly cache.

note : check the Assembly : run-->c:\\windows\assembly

No comments:

Post a Comment