Tuesday, June 15, 2010

Getting Assemblies from GAC

Assemblies from GAC

At times we face situations wherein we need the dlls or assemblies directly. Generally the assemblies reside in the Assembly Folder which is best known as GAC (Global Assembly Cache). To open the GAC – go to run and write "assembly" (without quotes), this will open a folder at location "C:\WINDOWS\assembly". This is where we can find all the assemblies listed. Now if we would like to get the dll or assembly rather than the reference, then what..? L I tried to copy the dll.. upps.!! It will not work….

Finally found a way out to get upto the dll --- J

Steps –

  1. Go to run and write "c:\WINDOWS\assembly\gac_msil"
  2. This will open a folder where we can find the assembly folders.

For simplicity let us take and example to find the mostly used dll for SharePoint – Microsoft.SharePoint.dll . We would use the same command from the run, we could find a folder named Microsoft.SharePoint. This is the folder that contains the dll. @ C:\WINDOWS\assembly\gac_msil\Microsoft.SharePoint. On clicking the folder we would land on the folder named 12.0.0.0__71e9bce111e9429c, this is folder name shows the version number+_+ public key token ( we can get the public key token from this place as well, however this is not recommended) and inside this folder (C:\WINDOWS\assembly\gac_msil\Microsoft.SharePoint\12.0.0.0__71e9bce111e9429c)we get the desired dll - Microsoft.SharePoint.dll


 

Hope this information helps other…..

……. HaPpY CoDinG

Partha (Aurum)

No comments:

Post a Comment